Submission #163120

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1631202019-11-11 13:03:36mhy908Werewolf (IOI18_werewolf)C++14
100 / 100
966 ms64420 KiB
#include "werewolf.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
typedef vector<int> vi;
const LL llinf=987654321987654321;
const int inf=987654321;
int n, q;
struct query{
int l, r;
int s, e;
int stx, finx, sty, finy;
int num;
}qu[200010];
bool operator < (const query &a, const query &b){
if(a.l!=b.l)return a.l<b.l;
if(a.r!=b.r)return a.r<b.r;
if(a.s!=b.s)return a.s<b.s;
if(a.e!=b.e)return a.e<b.e;
}
bool cmp1(query a, query b){
if(a.l!=b.l)return a.l<b.l;
return a<b;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

werewolf.cpp: In function 'void makeltree()':
werewolf.cpp:101:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0; j<link[i].size(); j++){
                      ~^~~~~~~~~~~~~~~
werewolf.cpp:118:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0; j<link[i].size(); j++){
                      ~^~~~~~~~~~~~~~~
werewolf.cpp: In function 'void makertree()':
werewolf.cpp:141:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0; j<link[i].size(); j++){
                      ~^~~~~~~~~~~~~~~
werewolf.cpp:159:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=0; j<link[i].size(); j++){
                      ~^~~~~~~~~~~~~~~
werewolf.cpp: In function 'vi check_validity(int, vi, vi, vi, vi, vi, vi)':
werewolf.cpp:224:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<X.size(); i++){
                  ~^~~~~~~~~
werewolf.cpp: In function 'bool operator<(const query&, const query&)':
werewolf.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...