제출 #1081884

#제출 시각아이디문제언어결과실행 시간메모리
1081884Dennis_JasonPoi (IOI09_poi)C++17
5 / 100
156 ms16980 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}; } auto cmp=[&](pii a,pii b) { if(a.first==b.first) return a.second<b.second; return a.first<b.first; }; sort(part.begin(),part.end(),cmp); for(int i=1;i<=n;++i) { auto[x,y]=part[i]; if(y==p) { cout<<x<<" "<<i; return 0; } } return 0; }

컴파일 시 표준 에러 (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__
      |
#Verdict Execution timeMemoryGrader output
Fetching results...