Submission #705026

# Submission time Handle Problem Language Result Execution time Memory
705026 2023-03-03T08:29:32 Z MtSaka Monster Game (JOI21_monster) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
#define rep(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rrep(i,a,b) for(ll i=(ll)b-1;i>=(ll)a;i--)
#define all(x) begin(x),end(x)
using ll=long long;
using namespace std;
using ull=unsigned long long;
template<typename T,typename U>
inline bool chmax(T&a,const U&b){return (a<b)?a=b,true:false;}
template<typename T,typename U>
inline bool chmin(T&a,const U&b){return (a>b)?a=b,true:false;}
#include "monster.h"
vector<int>Solve(int n){
  assert(n<=100);
  vector<int>cnt(n,0);
  vector<vector<int>>a(n,vector<int>(n,0));
  rep(i,0,n)rep(j,i+1,n){
    bool f=Query(i,j);
    if(f)cnt[i]++;
    else cnt[j]++;
    a[i][j]=f;
    a[j][i]=!f;
  }
  vl ans(n);
  rep(i,0,n)if(cnt[i]==n-2){
    rep(j,i+1,n)if(cnt[j]==n-2){
      if(a[i][j])cnt[j]++;
      else cnt[i]++;
      break;
    }
    break;
  }
  rep(i,0,n)if(cnt[i]==1){
    rep(j,i+1,n)if(cnt[j]==1){
      if(a[i][j])cnt[i]--;
      else cnt[j]--;
      break;
    }
    break;
  }
  return cnt;
}

Compilation message

monster.cpp: In function 'std::vector<int> Solve(int)':
monster.cpp:24:3: error: 'vl' was not declared in this scope; did you mean 'll'?
   24 |   vl ans(n);
      |   ^~
      |   ll