Codefoces Looksery Cup 2015总结
Codefoces Looksery Cup 2015总结
人生的第二场CF就以再降低70rating结束了。考得奇差无比。
A题 Face Detection
/*Copyright (c)2015 YeGuanghao
*This source-code is licensed under GPLv3
*/
#include<iostream>
#include<cstdio>
#include<iomanip>
#include<climits>
#include<cmath>
#include<ctime>
#include<vector>
#include<set>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<stack>
#include<queue>
using namespace std;
inline int R(int &x)
{
x=0;int f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
x*=f;
}
#define P(x) printf("%d\n",x)
const int maxn=100;
char a[maxn][maxn];
int n,m;
bool judge(int y,int x){
bool have[4];
memset(have,0,sizeof(have));
for(int i=y;i<=y+1;i++) {
for(int j=x;j<=x+1;++j) {
switch(a[i][j]) {
case 'f':
have[0]++;
break;
case 'a':
have[1]++;
break;
case 'c':
have[2]++;
break;
case 'e':
have[3]++;
break;
}
}
}
return have[0]&have[1]&have[2]&have[3];
}
int main()
{
int ans=0;
R(n); R(m);
for(int i=1;i<=n;++i) {
for(int j=1;j<=m;++j) a[i][j]=getchar();
getchar();
}
for(int i=1;i<n;++i) {
for(int j=1;j<m;++j)
ans+=judge(i,j);
}
P(ans);
}
暴力签到题,就是这道题第一次交上去去还wa了一发,不知道是怎么脑残了,把循环打到1到4了。。。
C题 The Game Of Parity
博弈论的题,之前从未做过博弈论的题,yy了一会,猜出是操作数除以2,如何判断,然后因为只讨论了citizen's number is odd 的情况,所以WA了几发,然后只有20分钟了,根本没有办法冷静下来想题。
D题Haar Features
看AC情况感觉此题很水的样子,但是一直没有读懂题QuQ,英文太烂了啊!!!
G题 Happy Line
G题看了题面觉得可能是排序的搞法,但是没有yy出来,写了一个\(n^{2}\)的骗分,果然fst了。OvO
H 题Degenerate Matrix
根本没有想到二分答案,一直在推公式,推好公式,觉得没有问题,找不到反例就放弃了QuQ