# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
877858 |
2023-11-23T19:15:41 Z |
auslander |
Money (IZhO17_money) |
C++17 |
|
0 ms |
444 KB |
#include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
pair<ll, ll>arr[1000006];
int main()
{
ll i, n;
cin >> n;
for (i = 0; i < n; i++)
{
cin >> arr[i].first;
arr[i].second = i;
}
sort(arr, arr + n);
ll e = 1;
for (i = 1; i < n; i++)
{
if (arr[i].second < arr[i - 1].second)
e++;
}
cout << e << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
444 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
444 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
444 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
444 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |