tozangezan's diary

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

2013-11-01から1ヶ月間の記事一覧

今日解いた問題たち⑩

ICPCからの現実逃避のためにCodeforcesのcombinatoricsをまたやってみました。前回からしばらく空いていたので、そのあいだに埋めていないsolvedの多い問題も増えていました。353B: Two Heaps Greedyつらい。 #include<stdio.h> #include<algorithm> using namespace std; int b[</algorithm></stdio.h>…

AOJ 1322

AOJ

この手の構文解析のなかではかなり楽な類だと思います。問題文の通りにかくだけ。 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int inv[2011]; char str[30][128]; int mod=2011; int a; int b; int find(int top,int bottom,int left){ for(int i=top</algorithm></string.h></stdio.h>…

AOJ 1177

AOJ

1100点の幾何。ひたすら場合分けをがんばろう!! #include<stdio.h> #include<algorithm> #include<math.h> using namespace std; const double EPS=1e-10; const double INF=1e+10; const double PI=acos(-1); int sig(double r){return (r<-EPS)?-1:(r>+EPS)?+1:0;} double Abs(double</math.h></algorithm></stdio.h>…