| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1013032 | vjudge1 | ACM (COCI19_acm) | C++17 | 5 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define team "NijeZivotJedanACM"
map<string, pair<int,int> > points;
bool sorter(pair<int,pair<int,string> > a, pair<int, pair<int, string> > b)
{
if(a.first != b.first) return a.first > b.first;
return a.second < b.second;
}
int main()
{
int n, m;
cin >> n >> m;
for(int i = 0; i <= n; i ++)
{
string name;
cin >> name;
pair<int,int> score = {0, 0};
for(int j = 0; j < m; j ++)
{
string res;
cin >> res;
if(res[0] == '-') continue;
score.first++;
score.second += 20 * (res[1] - '1') * 60;
score.second += stoi(res.substr(3, 2)) * 3600;
score.second += stoi(res.substr(6, 2)) * 60;
score.second += stoi(res.substr(9, 2));
}
points[name] = score;
}
vector<pair<int, pair<int, string> > > vec;
for(auto x : points)
vec.push_back({x.second.first, {x.second.second, x.first}});
sort(vec.begin(), vec.end(), sorter);
for(int i = 0; i < vec.size(); i ++)
if(vec[i].second.second == team)
cout << i + 1 << endl;
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
