제출 #1260907

#제출 시각아이디문제언어결과실행 시간메모리
1260907Szymon_PilipczukPassport (JOI23_passport)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define st first #define nd second #define pb push_back #define all(a) a.begin(),a.end() #define rep(a,b) for(int a = 0;a<b;a++) const int inf = 1e9; const ll infl = 1e18; int rang[200000]; int main() { int n; cin>>n; rep(i,n) { int a,b; cin>>a>>b; rang[i] = b-1; } int uss; cin>>uss>>uss; int r = 0; int mx = rang[0]; int ans = 0; while(r < n-1) { int prev = r; r = mx; for(int i = prev + 1;i=<r;i++) { mx = max(mx,rang[i]); } ans++; if(prev == r) { cout<<-1<<"\n"; return 0; } } cout<<ans<<"\n"; }

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

passport.cpp: In function 'int main()':
passport.cpp:32:32: error: expected primary-expression before '<' token
   32 |         for(int i = prev + 1;i=<r;i++)
      |                                ^