# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
425645 | 2021-06-13T09:38:00 Z | ngrace | Aliens (IOI16_aliens) | C++14 | 2 ms | 288 KB |
#include "aliens.h" #include <vector> #include <iostream> #include <utility> using namespace std; #define v vector #define pii pair<int,int> #define fi first #define se second v<v<v<int>>> memo; long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) { if(k==n && m<=100){//sub 1 v<v<bool>> squares(m,v<bool>(m,false)); for(int i=0;i<n;i++){ int low=min(r[i],c[i]); int high=max(r[i],c[i]); for(int a=low;a<=high;a++){ for(int b=low;b<=high;b++){ squares[a][b]=true; } } } long long out=0; for(int i=0;i<m;i++){ for(int j=0;j<m;j++){ out+=squares[i][j]; } } return out; } else{//assume sub 2 //as all along diagonal can do dp with n^3 } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 288 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 204 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
2 | Incorrect | 1 ms | 204 KB | Wrong answer: output = 2, expected = 4 |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 288 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 204 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
22 | Incorrect | 1 ms | 204 KB | Wrong answer: output = 2, expected = 4 |
23 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 288 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 204 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
22 | Incorrect | 1 ms | 204 KB | Wrong answer: output = 2, expected = 4 |
23 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 288 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 204 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
22 | Incorrect | 1 ms | 204 KB | Wrong answer: output = 2, expected = 4 |
23 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
2 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
3 | Correct | 1 ms | 204 KB | Correct answer: answer = 4 |
4 | Correct | 1 ms | 204 KB | Correct answer: answer = 12 |
5 | Correct | 1 ms | 204 KB | Correct answer: answer = 52 |
6 | Correct | 1 ms | 204 KB | Correct answer: answer = 210 |
7 | Correct | 1 ms | 204 KB | Correct answer: answer = 88 |
8 | Correct | 1 ms | 204 KB | Correct answer: answer = 7696 |
9 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
10 | Correct | 1 ms | 204 KB | Correct answer: answer = 2374 |
11 | Correct | 1 ms | 204 KB | Correct answer: answer = 9502 |
12 | Correct | 1 ms | 288 KB | Correct answer: answer = 49 |
13 | Correct | 1 ms | 204 KB | Correct answer: answer = 151 |
14 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
15 | Correct | 1 ms | 204 KB | Correct answer: answer = 7220 |
16 | Correct | 1 ms | 204 KB | Correct answer: answer = 7550 |
17 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
18 | Correct | 1 ms | 204 KB | Correct answer: answer = 10000 |
19 | Correct | 1 ms | 204 KB | Correct answer: answer = 624 |
20 | Correct | 2 ms | 204 KB | Correct answer: answer = 10000 |
21 | Correct | 1 ms | 204 KB | Correct answer: answer = 1 |
22 | Incorrect | 1 ms | 204 KB | Wrong answer: output = 2, expected = 4 |
23 | Halted | 0 ms | 0 KB | - |