답안 #28744

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
28744 2017-07-16T12:44:38 Z repeating Aliens (IOI16_aliens) C++11
4 / 100
0 ms 2032 KB
#include <bits/stdc++.h>
#include "aliens.h"
#define F first
#define S second
#define P push
#define pb push_back
#define MEM(dp,i) memset(dp,i,sizeof(dp))
#define W while
#define R return
#define C continue
#define SI size()
#define ll long long
#define ld long double
#define pll pair<ll,ll>
#define pii pair<int,int>
#define SF(x) scanf("%I64d",&x)
#define SF2(x,y) scanf("%I64d%I64d",&x,&y)
#define SF3(x,y,z) scanf("%I64d%I64d%I64d",&x,&y,&z)
#define SF4(x,y,z,o) scanf("%I64d%I64d%I64d%I64d",&x,&y,&z,&o)
#define all(v) v.begin(),v.end()

using namespace std;
const long long INF = 1e8;
const int MX=200015;
int n,m,k;
bool b[111][111];
long long take_photos(int n_, int m_, int k_, vector<int> r, vector<int> c) {
    n=n_,m=m_,k=k_;
    for(int i=0;i<n;i++){
        int m1=min(r[i],c[i]);
        int m2=max(r[i],c[i]);
        for(int q=m1;q<=m2;q++){
            for(int j=m1;j<=m2;j++){
                b[q][j]=1;
            }
        }
    }
    int res=0;
    for(int i=0;i<m;i++){
        for(int j=0;j<m;j++)
            res+=b[i][j];
    }
    return res;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2032 KB Correct answer: answer = 4
2 Correct 0 ms 2032 KB Correct answer: answer = 4
3 Correct 0 ms 2032 KB Correct answer: answer = 4
4 Correct 0 ms 2032 KB Correct answer: answer = 12
5 Correct 0 ms 2032 KB Correct answer: answer = 52
6 Correct 0 ms 2032 KB Correct answer: answer = 210
7 Correct 0 ms 2032 KB Correct answer: answer = 88
8 Correct 0 ms 2032 KB Correct answer: answer = 7696
9 Correct 0 ms 2032 KB Correct answer: answer = 1
10 Correct 0 ms 2032 KB Correct answer: answer = 2374
11 Correct 0 ms 2032 KB Correct answer: answer = 9502
12 Correct 0 ms 2032 KB Correct answer: answer = 49
13 Correct 0 ms 2032 KB Correct answer: answer = 151
14 Correct 0 ms 2032 KB Correct answer: answer = 7550
15 Correct 0 ms 2032 KB Correct answer: answer = 7220
16 Correct 0 ms 2032 KB Correct answer: answer = 7550
17 Correct 0 ms 2032 KB Correct answer: answer = 10000
18 Correct 0 ms 2032 KB Correct answer: answer = 10000
19 Correct 0 ms 2032 KB Correct answer: answer = 624
20 Correct 0 ms 2032 KB Correct answer: answer = 10000
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2032 KB Correct answer: answer = 1
2 Incorrect 0 ms 2032 KB Wrong answer: output = 2, expected = 4
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2032 KB Correct answer: answer = 4
2 Correct 0 ms 2032 KB Correct answer: answer = 4
3 Correct 0 ms 2032 KB Correct answer: answer = 4
4 Correct 0 ms 2032 KB Correct answer: answer = 12
5 Correct 0 ms 2032 KB Correct answer: answer = 52
6 Correct 0 ms 2032 KB Correct answer: answer = 210
7 Correct 0 ms 2032 KB Correct answer: answer = 88
8 Correct 0 ms 2032 KB Correct answer: answer = 7696
9 Correct 0 ms 2032 KB Correct answer: answer = 1
10 Correct 0 ms 2032 KB Correct answer: answer = 2374
11 Correct 0 ms 2032 KB Correct answer: answer = 9502
12 Correct 0 ms 2032 KB Correct answer: answer = 49
13 Correct 0 ms 2032 KB Correct answer: answer = 151
14 Correct 0 ms 2032 KB Correct answer: answer = 7550
15 Correct 0 ms 2032 KB Correct answer: answer = 7220
16 Correct 0 ms 2032 KB Correct answer: answer = 7550
17 Correct 0 ms 2032 KB Correct answer: answer = 10000
18 Correct 0 ms 2032 KB Correct answer: answer = 10000
19 Correct 0 ms 2032 KB Correct answer: answer = 624
20 Correct 0 ms 2032 KB Correct answer: answer = 10000
21 Correct 0 ms 2032 KB Correct answer: answer = 1
22 Incorrect 0 ms 2032 KB Wrong answer: output = 2, expected = 4
23 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2032 KB Correct answer: answer = 4
2 Correct 0 ms 2032 KB Correct answer: answer = 4
3 Correct 0 ms 2032 KB Correct answer: answer = 4
4 Correct 0 ms 2032 KB Correct answer: answer = 12
5 Correct 0 ms 2032 KB Correct answer: answer = 52
6 Correct 0 ms 2032 KB Correct answer: answer = 210
7 Correct 0 ms 2032 KB Correct answer: answer = 88
8 Correct 0 ms 2032 KB Correct answer: answer = 7696
9 Correct 0 ms 2032 KB Correct answer: answer = 1
10 Correct 0 ms 2032 KB Correct answer: answer = 2374
11 Correct 0 ms 2032 KB Correct answer: answer = 9502
12 Correct 0 ms 2032 KB Correct answer: answer = 49
13 Correct 0 ms 2032 KB Correct answer: answer = 151
14 Correct 0 ms 2032 KB Correct answer: answer = 7550
15 Correct 0 ms 2032 KB Correct answer: answer = 7220
16 Correct 0 ms 2032 KB Correct answer: answer = 7550
17 Correct 0 ms 2032 KB Correct answer: answer = 10000
18 Correct 0 ms 2032 KB Correct answer: answer = 10000
19 Correct 0 ms 2032 KB Correct answer: answer = 624
20 Correct 0 ms 2032 KB Correct answer: answer = 10000
21 Correct 0 ms 2032 KB Correct answer: answer = 1
22 Incorrect 0 ms 2032 KB Wrong answer: output = 2, expected = 4
23 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2032 KB Correct answer: answer = 4
2 Correct 0 ms 2032 KB Correct answer: answer = 4
3 Correct 0 ms 2032 KB Correct answer: answer = 4
4 Correct 0 ms 2032 KB Correct answer: answer = 12
5 Correct 0 ms 2032 KB Correct answer: answer = 52
6 Correct 0 ms 2032 KB Correct answer: answer = 210
7 Correct 0 ms 2032 KB Correct answer: answer = 88
8 Correct 0 ms 2032 KB Correct answer: answer = 7696
9 Correct 0 ms 2032 KB Correct answer: answer = 1
10 Correct 0 ms 2032 KB Correct answer: answer = 2374
11 Correct 0 ms 2032 KB Correct answer: answer = 9502
12 Correct 0 ms 2032 KB Correct answer: answer = 49
13 Correct 0 ms 2032 KB Correct answer: answer = 151
14 Correct 0 ms 2032 KB Correct answer: answer = 7550
15 Correct 0 ms 2032 KB Correct answer: answer = 7220
16 Correct 0 ms 2032 KB Correct answer: answer = 7550
17 Correct 0 ms 2032 KB Correct answer: answer = 10000
18 Correct 0 ms 2032 KB Correct answer: answer = 10000
19 Correct 0 ms 2032 KB Correct answer: answer = 624
20 Correct 0 ms 2032 KB Correct answer: answer = 10000
21 Correct 0 ms 2032 KB Correct answer: answer = 1
22 Incorrect 0 ms 2032 KB Wrong answer: output = 2, expected = 4
23 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 2032 KB Correct answer: answer = 4
2 Correct 0 ms 2032 KB Correct answer: answer = 4
3 Correct 0 ms 2032 KB Correct answer: answer = 4
4 Correct 0 ms 2032 KB Correct answer: answer = 12
5 Correct 0 ms 2032 KB Correct answer: answer = 52
6 Correct 0 ms 2032 KB Correct answer: answer = 210
7 Correct 0 ms 2032 KB Correct answer: answer = 88
8 Correct 0 ms 2032 KB Correct answer: answer = 7696
9 Correct 0 ms 2032 KB Correct answer: answer = 1
10 Correct 0 ms 2032 KB Correct answer: answer = 2374
11 Correct 0 ms 2032 KB Correct answer: answer = 9502
12 Correct 0 ms 2032 KB Correct answer: answer = 49
13 Correct 0 ms 2032 KB Correct answer: answer = 151
14 Correct 0 ms 2032 KB Correct answer: answer = 7550
15 Correct 0 ms 2032 KB Correct answer: answer = 7220
16 Correct 0 ms 2032 KB Correct answer: answer = 7550
17 Correct 0 ms 2032 KB Correct answer: answer = 10000
18 Correct 0 ms 2032 KB Correct answer: answer = 10000
19 Correct 0 ms 2032 KB Correct answer: answer = 624
20 Correct 0 ms 2032 KB Correct answer: answer = 10000
21 Correct 0 ms 2032 KB Correct answer: answer = 1
22 Incorrect 0 ms 2032 KB Wrong answer: output = 2, expected = 4
23 Halted 0 ms 0 KB -