Please sign in first.
Submission #22653151
Source Code Expand
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
using namespace std;
typedef long long ll;
const double PI = acos(-1.0);
const ll modn = 1000000007;
int main()
{
int n;
cin >> n;
map<int, string> m;
string s;
int t;
for (int i = 0; i < n; i++) {
cin >> s >> t;
m[t] = s;
}
map<int, string>::iterator it = m.end();
--it;
cout << (*--it).second << endl;
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Do you know the second highest mountain? |
| User | ameolp |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 843 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 3672 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 7 ms | 3548 KiB |
| 001.txt | AC | 3 ms | 3596 KiB |
| 002.txt | AC | 4 ms | 3616 KiB |
| 003.txt | AC | 2 ms | 3536 KiB |
| 004.txt | AC | 4 ms | 3576 KiB |
| 005.txt | AC | 5 ms | 3644 KiB |
| 006.txt | AC | 3 ms | 3672 KiB |
| example0.txt | AC | 2 ms | 3560 KiB |
| example1.txt | AC | 2 ms | 3596 KiB |
| example2.txt | AC | 2 ms | 3600 KiB |