Submission #1081876

#TimeUsernameProblemLanguageResultExecution timeMemory
1081876Dennis_JasonPoi (IOI09_poi)C++14
0 / 100
171 ms17508 KiB
#include <bits/stdc++.h> #define NMAX 2005 #define pb push_back #define eb emplace_back #define MOD 100003 #define nl '\n' #define INF 2147483647 #define LLONG_MAX 9223372036854775807 #define pii pair<int,int> #define tpl tuple<int,int,int> //#pragma GCC optimize("O3") using namespace std; ifstream fin("aib.in"); ofstream fout("aib.out"); /* * * ================DEMONSTRATION=================== =====================END======================== */ int n,t,p; vector<int>col; vector<vector<int>>can(NMAX); vector<pii>part; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin>>n>>t>>p; col.resize(t+1); part.resize(n+1); for(int i=1;i<=n;++i) { for(int j=1;j<=t;++j) { int x; cin>>x; col[j]+=x; if(x) can[i].pb(j); } } for(int i=1;i<=t;++i) { col[i]=n-col[i]; } for(int i=1;i<=n;++i) { int aux=0; for(auto x:can[i]) aux+=col[x]; part[i]={aux,i}; } sort(part.begin(),part.end()); for(int i=1;i<=n;++i) { auto[x,y]=part[i]; if(y==p) { cout<<x<<" "<<y; return 0; } } return 0; }

Compilation message (stderr)

poi.cpp:8: warning: "LLONG_MAX" redefined
    8 | #define LLONG_MAX 9223372036854775807
      | 
In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/limits.h:195,
                 from /usr/lib/gcc/x86_64-linux-gnu/10/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-linux-gnu/10/include/limits.h:34,
                 from /usr/include/c++/10/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:39,
                 from poi.cpp:1:
/usr/include/limits.h:135: note: this is the location of the previous definition
  135 | #  define LLONG_MAX __LONG_LONG_MAX__
      | 
poi.cpp: In function 'int main()':
poi.cpp:62:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   62 |         auto[x,y]=part[i];
      |             ^
#Verdict Execution timeMemoryGrader output
Fetching results...