Submission #1169633

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11696332025-03-19 03:23:20lightonGame (APIO22_game)C++20
100 / 100
1412 ms214112 KiB
#include "game.h"
#include <bits/stdc++.h>
#define all(v) v.begin(),v.end()
#define forf(i,s,e) for(int i = s; i<=e; i++)
#define forb(i,s,e) for(int i = s; i>=e; i--)
#define idx(i,v) lower_bound(all(v),i)-v.begin()
#define comp(v) v.erase(unique(all(v)),v.end())
#define sz(v) (int)v.size()
#define pb push_back
#pragma GCC optimize("O3, Ofast, unroll-loops")
using namespace std;
int N,K;
int S[1000001][31];
set<pair<int,int> > SET;
int chk[1000001][31];
vector<pair<int,int> > adj[1000001],radj[1000001];
void dnc(int dep, int s, int e){
if(s>e) return;
int m = s+e>>1;
forf(i,2*s,2*m) S[i][dep] = 1;
forf(i,2*m+1,2*e+1) S[i][dep] = 2;
dnc(dep+1,s,m-1), dnc(dep+1,m+1,e);
}
int f = 0;
int cnt = 0;
void upd(int now, int h){
if(h!= -1) {
assert(h<21);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

game.cpp:11:47: warning: bad option '-f Ofast' to pragma 'optimize' [-Wpragmas]
   11 | #pragma GCC optimize("O3, Ofast, unroll-loops")
      |                                               ^
game.cpp:11:47: warning: bad option '-f unroll-loops' to pragma 'optimize' [-Wpragmas]
game.cpp:18:31: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
   18 | void dnc(int dep, int s, int e){
      |                               ^
game.cpp:18:31: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
game.cpp:28:24: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
   28 | void upd(int now, int h){
      |                        ^
game.cpp:28:24: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
game.cpp:74:23: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
   74 | void init(int n, int k){
      |                       ^
game.cpp:74:23: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
game.cpp:84:32: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
   84 | int add_teleporter(int u, int v) {
      |                                ^
game.cpp:84:32: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
#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...