UVa
qwerty559
这个作者很懒,什么都没留下…
展开
-
UVA - 232 Crossword Answers
#include<stdio.h> #include<string.h> int main() { int r, c, kase = 0, first = 1; int a[15][15]; char s[15][15]; while (scanf("%d", &r) == 1 && r) { int cnt = 0; memse...原创 2019-07-12 17:40:54 · 110 阅读 · 0 评论 -
UVA - 455 Periodic Strings
#include<stdio.h> #include<string.h> #define maxn 100 int main() { int T, first = 1; char s[maxn]; scanf("%d", &T); while (T--) { scanf("%s", s); int len = strlen(s); int f...原创 2019-07-11 15:33:27 · 123 阅读 · 0 评论 -
UVA - 1225 Digit Counting
#include<stdio.h> #include<string.h> int main() { int T, n; int a[10]; scanf("%d", &T); while (T--) { memset(a, 0, sizeof(a)); scanf("%d", &n); for (int i = 1; i <= ...原创 2019-07-11 15:32:05 · 110 阅读 · 0 评论 -
UVA - 11809 Floating-Point Numbers
#include<stdio.h> #include<string.h> #include<math.h> const double eps = 1e-4; int main() { double M[20][40]; long long E[20][40]; // 打表 for (int i = 0; i <= 9; ++i) { f...原创 2019-07-14 11:19:51 · 123 阅读 · 0 评论 -
UVA - 202 Repeating Decimals
#include<stdio.h> #include<string.h> #define maxn 3005 int main() { int a, b; int ys[maxn], xs[maxn]; while (scanf("%d%d", &a, &b) == 2) { memset(ys, -1, sizeof(ys)); mems...原创 2019-07-13 16:37:16 · 132 阅读 · 0 评论 -
UVA - 1588 Kickdown
#include<stdio.h> #include<string.h> #define maxn 105 int match(char s1[], char s2[]) { int len1 = strlen(s1); int len2 = strlen(s2); int k = -1; for (int i = 0; i < len1; ++i) { ...原创 2019-07-13 12:07:45 · 143 阅读 · 0 评论 -
UVA - 158 Box
#include<stdio.h> int main() { int w, h, t; int rect[6][2]; while (scanf("%d%d", &w, &h) == 2) { if (w < h) { t = w; w = h; h = t; } rect[0][0] = w; rect[0][1] = h; ...原创 2019-07-12 20:54:22 · 150 阅读 · 0 评论 -
UVA - 10340 All in All
#include<stdio.h> #include<string.h> #define maxn 100005 int main() { char s[maxn], t[maxn]; while (scanf("%s%s", s, t) == 2) { int len1 = strlen(s); int len2 = strlen(t); int i ...原创 2019-07-12 20:18:00 · 129 阅读 · 0 评论 -
UVA - 1368 DNA Consensus String
#include<stdio.h> int main() { int T, m, n; char s[55][1005], t[] = "ACGT"; scanf("%d", &T); while (T--) { scanf("%d%d", &m, &n); for (int i = 0; i < m; ++i) { scanf(...原创 2019-07-12 19:59:53 · 193 阅读 · 0 评论 -
UVA - 227 Puzzle
#include<stdio.h> int main() { int x, y, kase = 0, first = 1; char s[10][10], c; while (1) { c = getchar(); if (c == 'Z') break; int j = 0; do { if (c == ' ') { x = 0; ...原创 2019-07-11 15:26:11 · 132 阅读 · 0 评论