QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#90109#3326. Help Chelsea!ChatGPTAC ✓2ms3460kbC++495b2023-03-22 13:23:022023-03-22 13:23:04

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-22 13:23:04]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3460kb
  • [2023-03-22 13:23:02]
  • 提交

answer

#include <iostream>
#include <string>
#include <map>
using namespace std;

int main() {
    int n;
    cin >> n;
    while (n--) {
        int p;
        cin >> p;
        string name, max_name;
        int price, max_price = -1;
        while (p--) {
            cin >> price >> name;
            if (price > max_price) {
                max_price = price;
                max_name = name;
            }
        }
        cout << max_name << endl;
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3460kb

input:

100
48
595377305 batlvhpzom
217387974 nozgqngcxngow
315582679 i
1763357483 agvzfyxmzunxsih
619926584 bepceqlrmdaef
997561468 zlpzri
408700434 ndnp
1218408233 lmnan
16539718 k
622982991 cyi
1480474921 lzwwnynkrtdhnh
1153024295 lpuvpbrbahdgvwjxvq
932240264 nbaptkthwtil
1643129913 lgikjuh
1609879949 ce...

output:

jkzok
ktkohbzv
jdehxgtw
xlvrpjyn
mv
vmwiuwejwxhzvfoy
nlin
bpmpziqifn
vjznxbwxgv
obfyxxkmqcqh
lleajkzrlyb
zduvzugjtzva
uqtpipsgofrcghlrsytk
euzguwpbeotrvytskpw
wqosdmitgygygxztrff
dpqm
mojssnojmihnm
pghgcypdtqx
uecvu
tjvogs
qaga
qcb
rbjolanxe
gpsecoaqfbynaxofqff
efdaexjnbjebdu
oyzddemc
jwuoriczyzzzpc...

result:

ok 100 lines

Extra Test:

score: 0
Extra Test Passed