2010-07-29から1日間の記事一覧

AOJ 0008 Sum of 4 Integers

#include <cstdio> #include <vector> #include <map> using namespace std; int main(){ int n; vector<int> v(4); map<vector<int>,bool> m; while(scanf("%d\n", &n)+1){ m.clear(); for(v[0] = 0; v[0] < 10; v[0]++) for(v[1] = 0; v[1] < 10; v[1]++) for(v[2] = 0; v[2] < 10; v[2]++) for(v</vector<int></int></map></vector></cstdio>…

AOJ 0007 Dept Hell

#include <cstdio> int main(){ int t,n; scanf("%d\n",&n); for(t=100000;n;n--){ t+=t/20; if(t%1000)t+=1000-t%1000; } printf("%d\n",t); } なんかひどい</cstdio>