Submission #1108474

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11084742024-11-04 08:16:36crafticatBuilding Skyscrapers (CEOI19_skyscrapers)C++17
0 / 100
801 ms1048576 KiB
#include <bits/stdc++.h>
using namespace std;
template<typename T>
using V = vector<T>;
using vi = V<int>;
using vb = V<bool>;
using pi = pair<int,int>;
#define F0R(i,n) for (int i = 0; i < n;i++)
#define FOR(i, j, n) for(int i = j; i < n;i++)
#define ckmin(x,y) x = min(x,y)
#define f first
#define s second
vi dx = {0,1,0,-1};
vi dy = {1,0,-1,0};
V<V<V<pi>>> grid;
V<vi> exists;
V<vb> visited;
void dfs(int x, int y) {
visited[x][y] = true;
if (exists[x][y] > 0) return;
for (auto [cX, cY] : grid[x][y]) {
if (visited[cX][cY]) continue;
dfs(cX,cY);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

skyscrapers.cpp: In function 'int main()':
skyscrapers.cpp:12:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >, std::allocator<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > >, std::allocator<std::vector<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >, std::allocator<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > > > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 | #define FOR(i, j, n) for(int i = j; i < n;i++)
......
   67 |     FOR(i, 1, grid.size() - 1) {
      |         ~~~~~~~~~~~~~~~~~~~~~          
skyscrapers.cpp:67:5: note: in expansion of macro 'FOR'
   67 |     FOR(i, 1, grid.size() - 1) {
      |     ^~~
skyscrapers.cpp:12:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >, std::allocator<std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 | #define FOR(i, j, n) for(int i = j; i < n;i++)
......
   68 |         FOR(j, 1, grid[i].size() - 1) {
      |             ~~~~~~~~~~~~~~~~~~~~~~~~   
skyscrapers.cpp:68:9: note: in expansion of macro 'FOR'
   68 |         FOR(j, 1, grid[i].size() - 1) {
      |         ^~~
skyscrapers.cpp:104:20: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  104 |     if (ans.size() != n) {
      |         ~~~~~~~~~~~^~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...