原创 cf#324 Div.2 Problem D Dima and Lisa
哥德巴赫猜想。。。 #include <iostream> #include <cstdio> #include <cstring> #include <cmath> using namespace std; int n,k,p1,p2
原创 cf#324 Div.2 Problem C Marina and Vasya
#include <iostream> #include <cstdio> using namespace std; int n,t,n1,n2,t1,t2,t3,t4; string s1,s2; int main() { scanf
原创 Hihocoder 1051 補提交卡
枚舉+貪心。 如果N<=M,那麼答案就是100。 否則,要補交,就要補上連續M天的空缺,一一枚舉過去就好。 #include <iostream> #include <cstdio> using namespace std; int T
原创 cf#324 Div.2 Problem B Kolya and Tanya
#include <iostream> #include <cstdio> using namespace std; #define MOD 1000000007 #define LL long long int n; LL fp(LL
原创 cf#324 Div.2 Problem A Olesya and Rodion
#include <iostream> #include <cstdio> using namespace std; int n,t; int main() { scanf("%d%d",&n,&t); if(t<10)
原创 HDU 5463 Clarke and minecraft
#include <iostream> #include <cstdio> #include <cstring> #include <vector> using namespace std; struct node { int t
原创 cf 2a Winner
#include <iostream> #include <cstdio> #include <map> using namespace std; string ss[1005]; int x[1005]; int main() {
原创 hdu 2504 又見GCD
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #define del(a,b) memset(a,b,sizeof(a)) using
原创 cf 7a Kalevitch and Chess
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { char m[8][8]; for(
原创 cf 3a Shortest path of the king
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { char c1,c2; int x1,x2;
原创 cf 1a Theatre Square
#include <iostream> #include <cstdio> using namespace std; int main() { long long n,m,a,b,c; scanf("%lld%lld%ll
原创 cf 4a Watermelon
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { int w; scanf("%d",&w);
原创 cf 8a Train and Peter
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { string s,s1,s2; bo
原创 乘法快速冪
long long fast_pow( long long a, long long b, int p ) { long long ans = 1; while( b ) { if ( b & 1 ) //
原创 cf 6a Triangle
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; int main() { int a[4]; int flag