제출 #839351

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8393512023-08-29 19:23:37popovicirobertJakarta Skyscrapers (APIO15_skyscraper)C++14
100 / 100
285 ms112532 KiB
#include <bits/stdc++.h>
using namespace std;
constexpr int MAXN = 30'000;
constexpr int MAXP = 30'000;
bitset<MAXP + 1> visited[MAXN];
struct Node {
unsigned short b, p;
int dist;
};
int main() {
#ifdef HOME
ifstream cin("input.in");
ofstream cout("output.out");
#endif
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
int n, m;
cin >> n >> m;
vector<unsigned short> b(m), p(m);
vector<vector<unsigned short>> P(n);
for (int i = 0; i < m; i++) {
cin >> b[i] >> p[i];
P[b[i]].push_back(p[i]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

skyscraper.cpp: In lambda function:
skyscraper.cpp:44:35: warning: narrowing conversion of 'b' from 'int' to 'short unsigned int' [-Wnarrowing]
   44 |                     Q.push_front({b, p, dist});
      |                                   ^
skyscraper.cpp:44:38: warning: narrowing conversion of 'p' from 'int' to 'short unsigned int' [-Wnarrowing]
   44 |                     Q.push_front({b, p, dist});
      |                                      ^
skyscraper.cpp:46:34: warning: narrowing conversion of 'b' from 'int' to 'short unsigned int' [-Wnarrowing]
   46 |                     Q.push_back({b, p, dist});
      |                                  ^
skyscraper.cpp:46:37: warning: narrowing conversion of 'p' from 'int' to 'short unsigned int' [-Wnarrowing]
   46 |                     Q.push_back({b, p, dist});
      |                                     ^
#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...