#include <bits/stdc++.h>
#include "art.h"
#define el '\n'
#define fi first
#define sc second
#define int ll
#define pii pair<int, int>
#define all(v) v.begin(), v.end()
using namespace std;
using ll=long long;
using ull=unsigned long long;
using ld=long double;
const int mod=1e9+7;
const int N=1e5+11;
int ask(int x, int n)
{
vector<int> a;
a.push_back(x);
for(int i=1;i<=n;i++) if(x!=i) a.push_back(i);
return publish(a);
}
void read(vector<int>& v, int x, int p)
{
vector<int> b;
for(int i=0;i<p;i++) b.push_back(v[i]);
b.push_back(x);
for(int i=p; i<v.size(); i++) b.push_back(v[i]);
vector<int> cc=b;
b=v;
v=cc;
}
void solve(int n)
{
vector<int> ans;
ans.push_back(1);
for(int i = 2; i <= n; i++) read(ans, i, (i-1-ask(1, n)+ask(i,n))/2);
answer(ans);
}
//signed main()
//{
//// freopen("divisor.INP", "r", stdin);
//// freopen("divisor.OUT", "w", stdout);
// ios_base::sync_with_stdio(0);
// cin.tie(0);
// int t=1;
// //cin >> t;
// while(t--)
// {
// sol();
// }
//}
Compilation message
art.cpp: In function 'll ask(ll, ll)':
art.cpp:20:20: error: could not convert 'a' from 'vector<long long int>' to 'vector<int>'
20 | return publish(a);
| ^
| |
| vector<long long int>
art.cpp: In function 'void read(std::vector<long long int>&, ll, ll)':
art.cpp:27:16: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for(int i=p; i<v.size(); i++) b.push_back(v[i]);
| ~^~~~~~~~~
art.cpp: In function 'void solve(ll)':
art.cpp:37:9: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
37 | answer(ans);
| ^~~
| |
| vector<long long int>
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) {
| ~~~~~~~~~^~~~