# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1103810 |
2024-10-21T19:28:51 Z |
bvv23 |
Go (COCI16_go) |
C++17 |
|
1 ms |
508 KB |
// Ahmadov orz
/// successful failure
#include <bits/stdc++.h>
/// #include <ext/pb_ds/assoc_container.hpp>
using namespace std;
/// using namespace __gnu_pbds;
#define int long long
#define pb push_back
#define pii pair<int, int>
#define all(v) v.begin(),v.end()
#define ff first
#define ss second
#define drop(x) cout<<x<<endl;return
// template <class T>
// using isTree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
/// sometimes you gotta think simple
struct custom_hash {
size_t operator()(uint64_t x) const {
static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
x ^= FIXED_RANDOM;
return x ^ (x >> 16);
}
};
void failure()
{
int n;
cin >> n;
int mx = 0;
int ans = 0;
string pokemon;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
int lazim, var;
cin >> lazim >> var;
int cnt = 0;
while (var >= lazim) {
cnt++;
var = var - lazim + 2;
}
if (cnt > mx) {
mx = cnt;
pokemon = s;
}
ans += cnt;
}
cout << ans << endl << pokemon << endl;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int tt = 1;
//cin >> tt;
while (tt--)
{
failure();
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
336 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
508 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
7 |
Correct |
1 ms |
336 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Correct |
1 ms |
336 KB |
Output is correct |
12 |
Correct |
1 ms |
336 KB |
Output is correct |
13 |
Correct |
1 ms |
336 KB |
Output is correct |
14 |
Correct |
1 ms |
336 KB |
Output is correct |
15 |
Correct |
1 ms |
336 KB |
Output is correct |
16 |
Correct |
1 ms |
336 KB |
Output is correct |
17 |
Correct |
1 ms |
336 KB |
Output is correct |
18 |
Correct |
1 ms |
460 KB |
Output is correct |
19 |
Correct |
1 ms |
336 KB |
Output is correct |
20 |
Correct |
1 ms |
336 KB |
Output is correct |
21 |
Correct |
1 ms |
336 KB |
Output is correct |
22 |
Correct |
1 ms |
336 KB |
Output is correct |
23 |
Correct |
1 ms |
336 KB |
Output is correct |
24 |
Correct |
1 ms |
504 KB |
Output is correct |
25 |
Correct |
1 ms |
336 KB |
Output is correct |