Submission #904418

# Submission time Handle Problem Language Result Execution time Memory
904418 2024-01-12T05:01:13 Z vjudge1 Land of the Rainbow Gold (APIO17_rainbow) C++17
0 / 100
2 ms 604 KB
#include <bits/stdc++.h>

#pragma optimize("03")
#pragma target("avx2")

using namespace std;

#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define pii pair<int,int>
#define all(v) v.begin(),v.end()
#define F first
#define S second
#define mem(a,i) memset(a,i,sizeof(a))
#define sz(s) (int)s.size()
#define y1 yy
#define ppb pop_back
#define lb lower_bound
#define ub upper_bound
#define gcd(a,b) __gcd(a,b)
#define in insert

const int MAX=3e5+5;
const int B=224;
const int N=1e6;
const int block=450;
const int maxB=MAX/B+10;
const ll inf=1e18;  
const int mod=1e9+7;
const int mod1=1e9+9;
const int logg=15;

int dx[8]={1,0,-1,0,1,-1,-1,1};
int dy[8]={0,1,0,-1,1,-1,1,-1};

int binpow(int a,int n){
  if(!n)return 1;
  if(n%2==1)return a*binpow(a,n-1)%mod;
  int k=binpow(a,n/2);
  return k*k%mod;
}

set<pii> pt;
set<pii> gr;

void init(int R, int C, int sr, int sc, int M, char *s){
  pt.in({sr,sc});
  for(int i=0;i<M;i++){
    if(s[i]=='N')sr--;
    if(s[i]=='S')sr++;
    if(s[i]=='W')sc--;
    if(s[i]=='E')sc++;
    pt.in({sr,sc});
  }
  for(pii x:pt){
    // if()
  }
}

int colour(int ar, int ac, int br, int bc) {
  int ans=0;
  int cnt=0;
}

// int main(){
//   int r,c,m,q;
//   cin>>r>>c>>m>>q;
//   int sr,sc;
//   cin>>sr>>sc;
//   char s[MAX];
//   for(int i=0;i<m;i++)cin>>s[i];
//   init(r,c,sr,sc,m,s);
//   while(q--){
//     int la,ra,lb,rb;
//     cin>>la>>ra>>lb>>rb;
//     cout<<colour(la,ra,lb,rb)<<"\n"<<"\n";
//   }
// }

Compilation message

rainbow.cpp:3: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    3 | #pragma optimize("03")
      | 
rainbow.cpp:4: warning: ignoring '#pragma target ' [-Wunknown-pragmas]
    4 | #pragma target("avx2")
      | 
rainbow.cpp: In function 'void init(int, int, int, int, int, char*)':
rainbow.cpp:57:11: warning: variable 'x' set but not used [-Wunused-but-set-variable]
   57 |   for(pii x:pt){
      |           ^
rainbow.cpp: In function 'int colour(int, int, int, int)':
rainbow.cpp:63:7: warning: unused variable 'ans' [-Wunused-variable]
   63 |   int ans=0;
      |       ^~~
rainbow.cpp:64:7: warning: unused variable 'cnt' [-Wunused-variable]
   64 |   int cnt=0;
      |       ^~~
rainbow.cpp:65:1: warning: no return statement in function returning non-void [-Wreturn-type]
   65 | }
      | ^
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 604 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 600 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 604 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 604 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 604 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -