제출 #885728

#제출 시각아이디문제언어결과실행 시간메모리
885728normankr07Aliens (IOI16_aliens)C++17
4 / 100
1 ms436 KiB
#include <bits/stdc++.h> #include "aliens.h" using ll = long long; using namespace std; long long take_photos(int n, int m, int k, std::vector<int> r, std::vector<int> c) { // Sub1 if (n == k) { vector<vector<int>> arr(m + 3, vector<int>(m + 3)); for (int i = 0; i < n; i++) { int xx = r[i], yy = c[i]; for (int x = min(xx, yy); x <= max(xx, yy); x++) for (int y = min(xx, yy); y <= max(xx, yy); y++) { arr[x][y]++; } } int cnt = 0; for (int x = 0; x <= m; x++) for (int y = 0; y <= m; y++) cnt += (arr[x][y] != 0); return cnt; } }

컴파일 시 표준 에러 (stderr) 메시지

aliens.cpp: In function 'long long int take_photos(int, int, int, std::vector<int>, std::vector<int>)':
aliens.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...