답안 #396428

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
396428 2021-04-30T00:17:46 Z Blondie Aliens (IOI16_aliens) C++17
0 / 100
1 ms 296 KB
#include<bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef pair<int, int> pii;
typedef long double ld;
 
#define F first
#define S second

ll take_photos(int n, int m, int k, vector<int> r, vector<int> c) {
	ll answer = 0;
	vector<vector<bool>> used(m, vector<bool>(m));
	for(int i = 0; i < n; i++) {
		if(r[i] > c[i]) {
			swap(r[i], c[i]);
		}
		int len = c[i] - r[i] + 1;
		for(int row = r[i]; row < r[i]+len; row++) {
			for(int col = r[i]; col < c[i]+len; col++) {
				if(!used[row][col]) {
					answer++;
					used[row][col] = true;
				}
			}
		}
	}
	return answer;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong answer: output = 6, expected = 4
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Correct answer: answer = 1
2 Incorrect 1 ms 296 KB Wrong answer: output = 2, expected = 4
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong answer: output = 6, expected = 4
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong answer: output = 6, expected = 4
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong answer: output = 6, expected = 4
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Wrong answer: output = 6, expected = 4
2 Halted 0 ms 0 KB -