Submission #956625

#TimeUsernameProblemLanguageResultExecution timeMemory
956625DeltaStructPoi (IOI09_poi)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int main(){ #define int long long int n,m,q; cin >> n >> m >> q; vector A(n,vector<int>(m)); vector<int> B(m,n); for (int i(0);i < n;++i) for (int k(0);k < m;++k) (cin>>A[i][k]),B[k]-=A[i][k]; vector<int> C(n); iota(C.rbegin(),C.rend(),m*n); for (int i(0);i < n;++i) for (int k(0);k < m;++k) C[i] += A[i][k]*B[k]*n*(m+1)-A[q-1][k]*n; intr = C[q-1]; sort(C.begin(),C.end(),greater<int>()); cout << r/n/(m+1) << ' ' << upper_bound(C.begin(),C.end(),r,greater<int>())-C.begin() << endl; }

Compilation message (stderr)

poi.cpp: In function 'int main()':
poi.cpp:9:3: error: 'intr' was not declared in this scope; did you mean 'int'?
    9 |   intr = C[q-1]; sort(C.begin(),C.end(),greater<int>());
      |   ^~~~
      |   int
poi.cpp:10:11: error: 'r' was not declared in this scope
   10 |   cout << r/n/(m+1) << ' ' << upper_bound(C.begin(),C.end(),r,greater<int>())-C.begin() << endl;
      |           ^