Submission #588801

#TimeUsernameProblemLanguageResultExecution timeMemory
588801shayanebrahimiArt Collections (BOI22_art)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl '\n' #define fast_io; ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); const ll MOD=1e9+7;//998244353//1e9+9//1111211111; //ll tavmd(ll a,ll b){if(b==0){return 1;}if(b%2==0){ll x=tavmd(a,b/2);return(x*x)%MOD;}else{return(a%MOD*tavmd(a,b-1)%MOD)%MOD;}} const ll MAXN=2e6+10; const ll INF=8e18; const ll LOG=30; void solve(ll n){ vector<ll>a(n),b(n),c; for(int i=1;i<=n;i++) c.push_back(i); for(int i=0;i<n;i++){ b[i]=publish(c); for(int j=1;j<n;j++){ swap(c[j],c[j-1]); } } for(int i=0;i<n;i++){ a[(b[i]-b[(i+1)%n]+n)/2]=i+1; } answer(a); } /*int main(){ fast_io; return 0; }*/

Compilation message (stderr)

art.cpp:5:9: warning: ISO C++11 requires whitespace after the macro name
    5 | #define fast_io;                 ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
      |         ^~~~~~~
art.cpp: In function 'void solve(ll)':
art.cpp:16:18: error: 'publish' was not declared in this scope
   16 |             b[i]=publish(c);
      |                  ^~~~~~~
art.cpp:24:7: error: 'answer' was not declared in this scope
   24 |       answer(a);
      |       ^~~~~~
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~