제출 #294151

#제출 시각아이디문제언어결과실행 시간메모리
294151Leonardo16Rectangles (IOI19_rect)C++14
컴파일 에러
0 ms0 KiB
/// Code by Leonardo16 /// “Your focus determines your reality.” – Qui-Gon Jinn #include<bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline") //#pragma GCC option("arch=native","tune=native","no-zero-upper") //#pragma GCC target("avx2") //#define int long long #define ll long long #define sz size #define ull unsigned long long #define ld long double #define ii pair<int,int> #define fst first #define scd second #define vi vector<int> #define vii vector<ii> #define pb push_back #define pf push_front #define fl '\n' #define el endl #define all(x) x.begin() , x.end() #define rall(x) x.rbegin() , x.rend() /// Functions #define db(x) cerr << #x << ": " << (x) << '\n'; #define random() __builtin_ia32_rdtsc() #define lg2(x) 31-__builtin_clz(x) #define lg2ll(x) 63-__builtin_clzll(x) #define pi acos(-1) #define YN(x) cout<<((x)?("YES"):("NO"))<<fl; #define yn(x) cout<<((x)?("Yes"):("No"))<<fl; #define des(x,s1,s2,end1,end2) cout<<((x)?(s1):(s2))<<fl;if(x){end1;}else{end2;} #define precision(x) cout.setf(ios::fixed);cout.precision(x); /// Red-Black Tree Template //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //using namespace __gnu_pbds; //typedef tree < long long , null_type , less<long long> , rb_tree_tag , tree_order_statistics_node_update > ordered_set; //#define less_than(n) order_of_key(n) //#define en_pos(n) find_by_order(n) /// Prime numbers 173,179,311,331,737,1009,2011,2027,3079,4001,100003 ///===================================================================== int n,m; ll count_rectangles( vector<vi> v ){ ll ans=0; n=v.sz(); m=v[0].sz(); // map<int,int>mp; // for(auto it:v){ // for(auto i2:it){ // mp[i2]++; // } // } // if(n==3){ for(int i=2;i<m;i++){ int mx=v[1][i]; int mi=0; for(int j=i-1;j>0;j--){ mi=max(mi,v[1][j]); if(m<mx && v[1][j]<v[0][j] && v[1][j]<v[2][j] && mi<v[1][j-1] ){ ans++; }else{ break; } } } return ans; // } if(mp.sz()<=2){ return ans; } for(int i=0;i<n;i++){ for(int j=i+2;j<n;j++){ } } } // //int main(){ // freopen("a.in","r",stdin); // cin>>n>>m; // vector<vector<int> >v; // // for(int i=0;i<n;i++){ // vi v1; // for(int i=0;i<m;i++){ // int x; // cin>>x;v1.pb(x); // } // v.pb(v1); // } // cout<<count_rectangles(v); //} //

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

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:73:8: error: 'mp' was not declared in this scope; did you mean 'm'?
   73 |     if(mp.sz()<=2){
      |        ^~
      |        m