QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#572455 | #3943. License to Launch | LaVuna47# | AC ✓ | 6ms | 3848kb | C++17 | 1.8kb | 2024-09-18 14:39:40 | 2024-09-18 14:39:40 |
Judging History
answer
/** gnu specific **/
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/** contains everything I need in std **/
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(S) ((int)S.size())
#define FOR(i, n) for(int i = 0; i < n; ++i)
#define RFOR(i, n) for(int i = n-1; i >= 0; --i)
#define output_vec(vec) { FOR(i_, sz(vec)) cout << vec[i_] << ' '; cout << '\n'; }
#define x first
#define y second
#define pb push_back
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef vector<bool> vb;
typedef short si;
typedef unsigned long long ull;
typedef long double LD;
typedef pair<ull, ull> pull;
using namespace __gnu_pbds;
typedef tree<ll, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
using namespace std;
#ifdef ONPC
mt19937 rnd(228);
#else
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif
int solve()
{
int n;
if (!(cin >> n))
return 1;
vector<int> a(n);
FOR (i, n)
cin >> a[i];
int mn = *min_element(all(a));
FOR (i, n)
{
if (a[i] == mn)
{
cout << i << '\n';
return 0;
}
}
return 0;
}
int32_t main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int TET = 1e9;
//cin >> TET;
for (int i = 1; i <= TET; i++)
{
if (solve())
{
break;
}
#ifdef ONPC
cout << "__________________________" << endl;
#endif
}
#ifdef ONPC
cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3676kb
input:
5 2 0 5 4 1
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
5 3 4 1 7 2
output:
2
result:
ok single line: '2'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
5 6 9 6 10 7
output:
0
result:
ok single line: '0'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
10 56 36 1 46 51 63 13 6 88 38
output:
2
result:
ok single line: '2'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
20 5 2 7 6 2 8 5 6 4 7 4 7 8 9 3 2 0 8 3 6
output:
16
result:
ok single line: '16'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
100 0 4 46 16 19 9 37 45 1 43 7 31 36 9 33 29 1 23 16 38 6 28 20 21 0 49 7 19 24 5 30 28 8 15 14 44 1 9 48 8 30 18 46 11 27 33 46 8 45 39 14 4 39 13 2 48 27 4 5 23 1 47 22 19 40 18 0 9 30 17 22 17 47 1 18 35 26 40 21 46 12 27 17 26 48 35 19 41 26 9 6 25 17 14 24 22 5 26 44 34
output:
0
result:
ok single line: '0'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
1000 716 260 429 79 640 202 738 845 276 322 994 597 252 580 662 528 784 173 731 660 952 784 693 645 925 714 639 907 38 121 836 281 766 976 621 998 893 685 361 387 641 549 565 345 513 85 418 9 196 613 548 432 727 638 568 582 926 694 606 454 333 39 152 871 526 295 38 992 392 670 105 947 703 413 305 34...
output:
758
result:
ok single line: '758'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3848kb
input:
10000 9111 9800 9903 5758 1667 6502 1578 7734 1484 9773 6403 4549 3031 4890 202 5499 8824 5695 9276 8431 7167 2849 505 9926 8179 8408 4653 8449 8507 9874 5535 5301 4080 7975 4968 7973 9275 7210 2090 6188 6582 1801 2859 6354 9495 1309 4644 7810 2894 2314 276 2538 7168 5012 2081 8340 4389 7542 8420 15...
output:
1628
result:
ok single line: '1628'
Test #9:
score: 0
Accepted
time: 5ms
memory: 3656kb
input:
100000 83088 20047 17013 12361 15781 99043 96524 85278 68295 57681 48962 41030 36614 68366 57406 15031 6984 15745 40895 96841 25846 16748 79376 27289 48729 9370 89149 93184 42278 26780 73430 94590 40492 75470 9992 4270 18024 97438 51184 83304 92607 59441 74454 69002 90344 82456 85330 64361 1452 5237...
output:
65106
result:
ok single line: '65106'
Test #10:
score: 0
Accepted
time: 3ms
memory: 3804kb
input:
100000 865558536 973643284 978509334 204425205 559053732 656496900 645835031 401928532 764641447 173519835 282436760 636253386 470996398 726201488 115546108 108759013 427249445 294081969 151496179 298375918 654306264 570977740 437351512 780802565 217728017 434400392 978932213 154826593 920008056 798...
output:
98713
result:
ok single line: '98713'
Test #11:
score: 0
Accepted
time: 6ms
memory: 3724kb
input:
100000 442693970 662985311 622295620 745575028 302695617 177369758 980917400 249025062 393170216 255237861 808683723 761932792 918394751 254304897 415491129 134365794 995537921 117371020 987714871 176022782 383397606 175169307 153138857 381557751 180032556 816490134 916484213 753070396 108404929 904...
output:
38584
result:
ok single line: '38584'