12048 | 2024-11-26 13:15:05 | TortelliniJr | Gyorsolvasó-verseny | cpp17 | Accepted 100/100 | 41ms | 816 KiB |
#include <fstream>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> n(N);
int m = 0;
for (int i = 0; i < N; i++) {
cin >> n[i];
}
for (int i = 0; i < N; i++)
{
if (n[i] < m && m != 0)
{
m = n[i];
}
else if (m == 0)
{
m = n[i];
}
}
cout << m << endl;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 320 KiB | ||||
2 | Accepted | 1ms | 500 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 1ms | 388 KiB | ||||
4 | Accepted | 1ms | 320 KiB | ||||
5 | Accepted | 1ms | 320 KiB | ||||
6 | Accepted | 1ms | 320 KiB | ||||
7 | Accepted | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 320 KiB | ||||
9 | Accepted | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
11 | Accepted | 1ms | 320 KiB | ||||
12 | Accepted | 1ms | 320 KiB | ||||
subtask3 | 40/40 | ||||||
13 | Accepted | 1ms | 320 KiB | ||||
14 | Accepted | 1ms | 320 KiB | ||||
15 | Accepted | 1ms | 320 KiB | ||||
16 | Accepted | 1ms | 356 KiB | ||||
17 | Accepted | 1ms | 324 KiB | ||||
18 | Accepted | 1ms | 320 KiB | ||||
19 | Accepted | 1ms | 520 KiB | ||||
20 | Accepted | 1ms | 320 KiB | ||||
21 | Accepted | 1ms | 320 KiB | ||||
subtask4 | 50/50 | ||||||
22 | Accepted | 1ms | 320 KiB | ||||
23 | Accepted | 2ms | 508 KiB | ||||
24 | Accepted | 14ms | 568 KiB | ||||
25 | Accepted | 34ms | 792 KiB | ||||
26 | Accepted | 18ms | 572 KiB | ||||
27 | Accepted | 35ms | 792 KiB | ||||
28 | Accepted | 30ms | 748 KiB | ||||
29 | Accepted | 6ms | 320 KiB | ||||
30 | Accepted | 41ms | 812 KiB | ||||
31 | Accepted | 37ms | 816 KiB |