# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1007245 | 2024-06-24T13:43:40 Z | Faggi | Data Transfer (IOI19_transfer) | C++17 | 컴파일 오류 |
0 ms | 0 KB |
#include <bits/stdc++.h> using namespace std; std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;}
Compilation message
transfer.cpp:3:60: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:63: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:81: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:84: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:96: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:99: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:120: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:126: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:129: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:132: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:135: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:146: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:149: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:152: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:155: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:163: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:169: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:172: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:175: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } if(un%2==0&&bit==0) return a; else if(un%2==1&&bit==1) return a; for(i=int(data.size())/2; i<int(data.size()); i++) { b.push_back(data[i]); } return b;} | ^ transfer.cpp:3:178: error: extended character is not valid in an identifier 3 | std::vector<int> get_attachment(std::vector<int> source) { vector<int>ret; int un=0; for(auto k:source) { if(k==1) un++; } for(auto k:source) ret.push_back(k); if(un%2==0) ret.push_back(0); else ret.push_back(1); return ret;}std::vector<int> retrieve(std::vector<int> data) { int bit, i, un=0; vector<int>a,b; bit=data[int(data.size())-1]; data.pop_back(); for(i=0; i<int(data.size())/2; i++) { a.push_back(data[i]); if(data[i]==1) un++; } i