제출 #866284

#제출 시각아이디문제언어결과실행 시간메모리
866284lomtaPoi (IOI09_poi)C++17
70 / 100
536 ms31828 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int N=2005; int arr[N][N]; main(){ int n,t,p;cin>>n>>t>>p; for(int i=0;i<n;i++){ for(int j=0;j<t;j++){ cin>>arr[i][j]; } } vector<int> v(t); for(int i=0;i<n;i++){ for(int j=0;j<t;j++){ if(arr[i][j]==0){ v[j]++; } } } vector<int> points(n,0); for(int i=0;i<n;i++){ for(int j=0;j<t;j++){ points[i]+=arr[i][j]*v[j]; } } int ans=0; p--; for(int i=0;i<n;i++){ if(points[i]>=points[p] && i<p){ ans++; } else if(points[i]>points[p] && i>p){ ans++; } else{ continue; } } //cout<<"here"<<endl; cout<<points[p]<<" "<<ans+1<<endl; }

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

poi.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main(){
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...