제출 #539033

#제출 시각아이디문제언어결과실행 시간메모리
539033timreizinJakarta Skyscrapers (APIO15_skyscraper)C++17
0 / 100
1 ms300 KiB
#include <iostream> #include <vector> #include <algorithm> #include <deque> using namespace std; const int INF = 1e9; int main() { int n, m; cin >> n >> m; vector<pair<int, int>> doges(m); for (auto &[b, p] : doges) cin >> b >> p; const int D = 180; vector<vector<int>> dp(n, vector<int>(D, 1e9)); vector<vector<int>> canGet(n); for (auto &[b, p] : doges) if (p >= D) for (int i = b % p; i < n; i += p) canGet[i].push_back(p); for (int i = 0; i < n; ++i) { sort(canGet.begin(), canGet.end()); canGet.erase(unique(canGet.begin(), canGet.end()), canGet.end()); for (int j = 0; j < canGet.size(); ++j) dp[i].push_back(1e9); } return 0; }

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

skyscraper.cpp: In function 'int main()':
skyscraper.cpp:24:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         for (int j = 0; j < canGet.size(); ++j) dp[i].push_back(1e9);
      |                         ~~^~~~~~~~~~~~~~~
#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...