CodeChef submission 136756 (C++ 4.0.0-8) plaintext list. Status: WA, problem SNCK01, contest SNACKDWN. By Blitzkrieg (Blitzkrieg), 2009-11-21 23:53:41.
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <cstring> #include<string.h> #include<math.h> #include <climits> #include <fstream> #include <sstream> using namespace std; #define FOR(i,a,b) for(int i= (int )a ; i < (int )b ; ++i) #define REP(i,n) FOR(i,0,n) #define F first #define S second #define PB push_back #define PP pop() #define EM empty() #define INF 2000000000 #define PF push_front #define ALL(x) x.begin(),x.end() #define SORT(x) sort(ALL(x)) #define V(x) vector< x > #define PRINT(x) cout << #x << " " << x << endl #define LET(x,a) __typeof(a) x(a) #define IFOR(i,a,b) for(LET(i,a);i!=(b);++i) #define EACH(it,v) IFOR(it,v.begin(),v.end()) #define PRESENT(c,x) ((c).find(x) != (c).end()) #define SZ(x) x.size(); #define CPRESENT(c,x) (find(c.begin(),c.end(),x) != (c).end()) #define PRV(v) REP(iii,v.size())cout<<v[iii]<<" ";cout<<endl; #define NT() int nt;for(scanf("%d",&nt);nt;nt--) typedef map<int,int> MI; typedef pair<int,int> PI; typedef long long int LL; typedef V( int ) VI; typedef V( VI ) VVI; typedef V( PI ) VPI; typedef V( string ) VS; typedef V( VS ) VVS; typedef int I ; int mex(VI arr) { int l=arr.size(); VI b(52,-1); REP(i,l) b[arr[i]]=1; FOR(i,1,52)if(b[i]!=-1)return i; return l+1; } int main() { int nt; while(nt--) { int n,m; VVI a(n,VI(m)); REP(i,n)REP(j,m) { } if(n==1) { if(a[0][0]!=1) else { int ct=0; REP(i,m) { if(a[0][i]!=1)break; ct++; } if(ct%2==0) else } continue; } int ans; REP(i,n) { if(i==0)ans=mex(a[i]); else ans=ans^mex(a[i]); } } }
Comments

