Submission #797588

#TimeUsernameProblemLanguageResultExecution timeMemory
797588XJP12Thousands Islands (IOI22_islands)C++17
0 / 100
1 ms340 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vii; struct ans{ bool bani; vector<int> v; }; struct ans find_journey(int n, int m, vector<int> u, vector<int> v){ bool ban=false; int ban1=0; int a=-1,b=-1,c=-1; for(int i=0; i<m; i++){ if(u[i]==0){ ban1++; if(a==-1){ a=i; }else{ b=i; } }else{ ban=true; c=i; } } vector<int> x(7); struct ans s; if(ban==false && ban1>1){ x={0,1,0,1,0,1,0}; s.bani=true; s.v=x; return s; }else{ s.bani=false; return s; } }

Compilation message (stderr)

islands.cpp: In function 'ans find_journey(int, int, std::vector<int>, std::vector<int>)':
islands.cpp:14:11: warning: variable 'b' set but not used [-Wunused-but-set-variable]
   14 |  int a=-1,b=-1,c=-1;
      |           ^
islands.cpp:14:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
   14 |  int a=-1,b=-1,c=-1;
      |                ^
#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...