Submission #1064605
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { int N, Q; cin >> N >> Q; vector<int> year( N ); vector<string> name( N ); REP( i, N ) { cin >> year[ i ] >> name[ i ]; } year.emplace_back( 1000000001 ); string res; REP( i, N + 1 ) { if( year[ i ] <= Q && year[ i + 1 ] > Q ) { res = name[ i ]; } if( Q > year[ N - 1 ] ) { res = name[ N - 1 ]; } } cout << res << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 旧総合研究7号館 |
User | chiwawa_star |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 604 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:16:7: error: ‘class std::vector<int>’ has no member named ‘emplace_back’