제출 #939884

#제출 시각아이디문제언어결과실행 시간메모리
939884LitusianoProgression (NOI20_progression)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define endl "\n" signed main(){ ios_base::sync_with_stdio(0); cin.tie(0); int n,q; cin>>n>>q; vector<int> v(n); for(int& i : v) cin>>i; while(q--){ int tp; cin>>tp; if(tp == 1){ //add int l,r; cin>>l>>r; l--; r--; int s,c; cin>>s>>c; } else if(tp == 2){ ok1=1; int l,r; cin>>l>>r; int s,c; cin>>s>>c; l--; r--; } else{ cnt++; int l,r; cin>>l>>r; l--; r--; if(l == r){ cout<<1<<endl; continue; } // cerr<<endl<<l<<" "<<r-1<<endl; // if(cnt == 90) cout<<"ANS: "; cout<<seg.query(l,r-1)+1<<endl; } } }

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

Progression.cpp: In function 'int main()':
Progression.cpp:18:4: error: 'ok1' was not declared in this scope
   18 |    ok1=1;
      |    ^~~
Progression.cpp:22:4: error: 'cnt' was not declared in this scope; did you mean 'int'?
   22 |    cnt++;
      |    ^~~
      |    int
Progression.cpp:29:10: error: 'seg' was not declared in this scope
   29 |    cout<<seg.query(l,r-1)+1<<endl;
      |          ^~~