| Task: | Tulostaulu |
| Sender: | Touko_Ursin |
| Submission time: | 2025-01-18 13:36:51 +0200 |
| Language: | C++ (C++20) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | TIME LIMIT EXCEEDED | 0 |
| #2 | TIME LIMIT EXCEEDED | 0 |
| #3 | TIME LIMIT EXCEEDED | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | TIME LIMIT EXCEEDED | -- | 1, 3 | details |
| #2 | TIME LIMIT EXCEEDED | -- | 2, 3 | details |
| #3 | TIME LIMIT EXCEEDED | -- | 3 | details |
| #4 | TIME LIMIT EXCEEDED | -- | 1, 2, 3 | details |
| #5 | TIME LIMIT EXCEEDED | -- | 3 | details |
| #6 | TIME LIMIT EXCEEDED | -- | 3 | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:6:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
6 | freopen("input.txt", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
input/code.cpp:7:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
7 | freopen("output.txt", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~Code
#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
int n, m, k;
cin>>n>>m>>k;
unordered_map<string, int> kilpailijat;
vector<string> nimet;
string x;
for(int i = 0; i<n; i++){
cin>>x;
kilpailijat.insert({x, i});
nimet.push_back(x);
}
vector<vector<int>> teht;
teht.resize(n);
for(int i = 0; i<n; i++){
for(int j = 0; j<m; j++){
teht[i].push_back(0);
}
}
char s;
int score;
for(int i = 0; i<m; i++){
cin>>x;
cin>>s;
cin>>score;
teht[kilpailijat[x]][s-'A'] = max(score, teht[kilpailijat[x]][s-'A']);
}
vector<pair<int,string>> tulokset;
for(int i = 0; i<n; i++){
int final=0;
for(int num: teht[i]){
final=final+num;
}
tulokset.push_back({final*-1, nimet[i]});
}
sort(tulokset.begin(), tulokset.end());
for(auto line: tulokset){
cout<<line.second<<" "<<line.first*-1<<"\n";
}
}Test details
Test 1
Group: 1, 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 1 5000 10 zsyad zsyad J 14 zsyad A 40 zsyad D 34 ... |
| correct output |
|---|
| zsyad 1000 |
| user output |
|---|
| (empty) |
Test 2
Group: 2, 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 100 5000 1 eayoy mkiie sqd mgq ... |
| correct output |
|---|
| ujogxx 100 dadxy 100 ttldevgm 100 awbj 100 j 100 ... |
| user output |
|---|
| (empty) |
Test 3
Group: 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 100 5000 10 bsvhdn xlxadb gbc sadll ... |
| correct output |
|---|
| ezgermxsii 927 urclsrvlq 924 shgvs 919 xwkqtroxqr 918 oovi 893 ... |
| user output |
|---|
| (empty) |
Test 4
Group: 1, 2, 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 1 0 1 xoezwspspf |
| correct output |
|---|
| xoezwspspf 0 |
| user output |
|---|
| (empty) |
Test 5
Group: 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 100 5000 10 bwv jxz cpktj mhzevc ... |
| correct output |
|---|
| afvgeut 0 ai 0 amfrsvuqao 0 beadkfbr 0 bkgztu 0 ... |
| user output |
|---|
| (empty) |
Test 6
Group: 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 100 5000 10 yifvbbjcz cnpkni qvltt ngpe ... |
| correct output |
|---|
| vgyo 10 msgagpngrd 10 cnpkni 10 lpwlq 10 qguwtubeqi 10 ... |
| user output |
|---|
| (empty) |
