提出 #31669085


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  set<string> original;
  priority_queue<pair<int, int> > tokuten;
  string s;
  int t;
  for (int i=1;i<N+1; ++i){
    cin >> s >> t;
    if ( ! original.count(s)){
      original.insert(s);
      tokuten.push(make_pair(t, -i));
    }
  }
  
  cout << -tokuten.top().second <<endl;
  return 0;
}

提出情報

提出日時
問題 C - Poem Online Judge
ユーザ nullpoint
言語 C++ (GCC 9.2.1)
得点 300
コード長 399 Byte
結果 AC
実行時間 150 ms
メモリ 11816 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 13
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 02_sorted_00.txt, 02_sorted_01.txt, 03_corner_00.txt, 03_corner_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 7 ms 3536 KiB
00_sample_01.txt AC 3 ms 3620 KiB
00_sample_02.txt AC 3 ms 3564 KiB
01_random_00.txt AC 45 ms 3596 KiB
01_random_01.txt AC 48 ms 3512 KiB
01_random_02.txt AC 56 ms 3540 KiB
01_random_03.txt AC 56 ms 3540 KiB
01_random_04.txt AC 148 ms 11816 KiB
01_random_05.txt AC 148 ms 11740 KiB
02_sorted_00.txt AC 150 ms 11672 KiB
02_sorted_01.txt AC 147 ms 11752 KiB
03_corner_00.txt AC 64 ms 3412 KiB
03_corner_01.txt AC 71 ms 4288 KiB