Submission #1839431
Source Code Expand
#include <stdio.h> #include <iostream> #include <algorithm> #define rep(index,max) for(int index=0;index<max;index++) using namespace std; int main(){ int n,m,x,y; int a[100010]; int b[100010]; int ans=0; int t=0; int *ai=a; int *bi cin>>n>>m; cin>>x>>y; rep(i,n) cin>>a[i]; rep(i,m) cin>>b[i]; while(1){ t=*ai+n; bi=lower_bound(b,b+m,t); if(bi==b+m) break; t=*bi+m; ai=lower_bound(a,a+n,t): if(ai==a+n) break; ans++; } cout<<ans<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 飛行機乗り |
User | syoshida3104 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 616 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:17:5: error: expected initializer before ‘cin’ cin>>n>>m; ^ ./Main.cpp:24:9: error: ‘bi’ was not declared in this scope bi=lower_bound(b,b+m,t); ^ ./Main.cpp:27:32: error: expected ‘;’ before ‘:’ token ai=lower_bound(a,a+n,t): ^