제출 #232306

#제출 시각아이디문제언어결과실행 시간메모리
232306Leonardo_Paes앵무새 (IOI11_parrots)C++11
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int n , int m[] ){ set<vector<int>> s; int qtd = 0; map<int, vector<int>> arr; for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ for(int k=0; k<4; k++){ for(int l=0; l<4; l++){ for(int m=0; m<4; m++){ for(int n=0; n<4; n++){ for(int o=0; o<4; o++){ for(int p=0; p<4; p++){ for(int q=0; q<4; q++){ for(int r=0; r<4; r++){ vector<int> x; x.push_back(i); x.push_back(j); x.push_back(k); x.push_back(l); x.push_back(m); x.push_back(n); x.push_back(o); x.push_back(p); x.push_back(q); x.push_back(r); sort(x.begin(), x.end()); if(s.find(x) == s.end()){ qtd++; s.insert(x); arr[qtd] = x; } } } } } } } } } } } for(int i=0; i<n; i++){ int val = 0; for(int j=0; j<6; j++){ if(m[i] & (1<<j)){ val += (1<<(j+3)); } } for(int j=0; j<10; j++){ send(val + arr[val][j]); } } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int n , int l, int m[] ){ set<vector<int>> s; int qtd = 0; map<int, vector<int>> arr; map<vector<int>, int> ans; for(int i=0; i<4; i++){ for(int j=0; j<4; j++){ for(int k=0; k<4; k++){ for(int l=0; l<4; l++){ for(int m=0; m<4; m++){ for(int n=0; n<4; n++){ for(int o=0; o<4; o++){ for(int p=0; p<4; p++){ for(int q=0; q<4; q++){ for(int r=0; r<4; r++){ vector<int> x; x.push_back(i); x.push_back(j); x.push_back(k); x.push_back(l); x.push_back(m); x.push_back(n); x.push_back(o); x.push_back(p); x.push_back(q); x.push_back(r); sort(x.begin(), x.end()); if(s.find(x) == s.end()){ qtd++; s.insert(x); arr[qtd] = x; ans[x] = qtd; } } } } } } } } } } } vector<int> x[65]; for(int i=0; i<l; i++){ for(int j=0; j<8; j++){ int val = 0, pos = 0; if(j<3){ val += m[i] & (1<<j); } else{ pos += m[i] & (1<<j); x[pos].push_back(val); } } } for(int i=1=0; i<n; i++){ sort(x[i].begin(), x[i].end()); output(ans[x[i]]); } }

컴파일 시 표준 에러 (stderr) 메시지

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:71:17: error: lvalue required as left operand of assignment
     for(int i=1=0; i<n; i++){
                 ^