标签:sam other 替换 when view integer choice 联合 type
第二场
1001 Is Derek lying?
1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 #include<algorithm> 5 #include<cmath> 6 #include<vector> 7 #include<set> 8 #include<string> 9 #include<sstream> 10 #include<cctype> 11 #include<map> 12 #include<stack> 13 #include<queue> 14 using namespace std; 15 #define INF 0x3f3f3f3f 16 17 const int maxn = 80000 + 10; 18 char a[maxn], b[maxn]; 19 20 int main() 21 { 22 // freopen("input.txt", "r", stdin); 23 // freopen("output.txt", "w", stdout); 24 int T, n, x, y; 25 scanf("%d", &T); 26 while(T--) 27 { 28 int p = 0, q = 0; 29 scanf("%d%d%d", &n, &x, &y); 30 scanf("%s", a); 31 scanf("%s", b); 32 for(int i = 0; i < n; i++) 33 { 34 if(a[i] == b[i]) p++; 35 else q++; 36 } 37 if(fabs(x - y) <= q && x + y <= 2 * p + q) 38 printf("Not lying\n"); 39 else printf("Lying\n"); 40 } 41 return 0; 42 }
第二场就做了一题,第三场除了一题签到题其他题都不会做,被九题十题的高中生草虐,我好菜啊.jpg
今天是暑假第一次这么早起,加油加油,继续刷题。
标签:sam other 替换 when view integer choice 联合 type
原文地址:http://www.cnblogs.com/roMxx/p/7277848.html