Ar pirminis?

Taškai: 100

Compile: OK

ar_pirminis.cpp: In function ‘void er()’: ar_pirminis.cpp:11:21: warning: iteration 9999999 invokes undefined behavior [-Waggressive-loop-optimizations] 11 | pirminis[i] = true; | ~~~~~~~~~~~~^~~~~~ ar_pirminis.cpp:9:23: note: within this loop 9 | for (int i = 2; i <= maxn; i++) | ~~^~~~~~~ ar_pirminis.cpp:15:23: warning: iteration 9999999 invokes undefined behavior [-Waggressive-loop-optimizations] 15 | if (pirminis[i]) | ~~~~~~~~~~^ ar_pirminis.cpp:13:23: note: within this loop 13 | for (int i = 2; i <= maxn; i++) | ~~^~~~~~~ ar_pirminis.cpp:11:21: warning: ‘void* __builtin_memset(void*, int, long unsigned int)’ writing 10000000 bytes into a region of size 9999999 overflows the destination [-Wstringop-overflow=] 11 | pirminis[i] = true; | ~~~~~~~~~~~~^~~~~~ ar_pirminis.cpp:5:6: note: at offset 2 into destination object ‘pirminis’ of size 10000001 5 | bool pirminis[maxn]; | ^~~~~~~~

nr.resulttimemessage
1True0.147 sok
2True0.111 sok
3True0.124 sok
4True0.127 sok
5True0.119 sok
6True0.119 sok
7True0.104 sok
8True0.103 sok
9True0.115 sok
10True0.103 sok
11True0.118 sok
12True0.116 sok
13True0.107 sok
14True0.11 sok
15True0.116 sok
16True0.119 sok
17True0.117 sok
18True0.121 sok
19True0.126 sok
20True0.128 sok
21True0.116 sok
22True0.108 sok