tozangezan's diary

勝手にソースコードをコピペして利用しないでください。

GCJ

GCJ2015 Round1A

GCJ

満点で7位でした。A: 英語を読むだけ。問題文いくらなんでも難しすぎると思う。解釈するのにかなり時間がかかった。 #include<stdio.h> #include<algorithm> using namespace std; int b[1100]; int main(){ int T; scanf("%d",&T); for(int t=1;t<=T;t++){ int a;scanf("%d",&a)</algorithm></stdio.h>…

GCJ2014 Round2

GCJ

なんだこのセットは…A: CFで既出らしい。やるだけ。 #include<stdio.h> #include<algorithm> using namespace std; int c[11000]; int main(){ int T; scanf("%d",&T); for(int t=0;t</algorithm></stdio.h>

GCJ2014 Round1A

GCJ

満点で45位でした。A: 実は全探索で枝刈りもすれば2^40も見なくてすむことが分かる(らしい)。探索むずすぎィ! 何でこんなの7分くらいで解けるんですか… #include<stdio.h> #include<algorithm> using namespace std; char c[200][100]; char d[200][100]; long long e[200]; lon</algorithm></stdio.h>…

GCJ2013 Round 2

GCJ

A-Large,B-Largeで通過ですA:座標圧縮とか、変な計算とか、面倒なことが多いだけ。 #include<stdio.h> #include<algorithm> using namespace std; int d[1000]; int e[1000]; int f[1000]; int zahyou[2000]; long long v[2000]; int mod=1000002013; int main(){ int T; scanf("</algorithm></stdio.h>…

GCJ2013 Round 1B

GCJ

A-Large,B-Large,C-Smallで通過ですA: Greedyするだけ #include<stdio.h> #include<queue> #include<algorithm> using namespace std; int d[100]; int e[100]; int main(){ int a; scanf("%d",&a); int T=0; while(a--){ T++; int b,c;scanf("%d%d",&b,&c); for(int i=0;i</algorithm></queue></stdio.h>