Submission #1082732

# Submission time Handle Problem Language Result Execution time Memory
1082732 2024-09-01T10:32:31 Z dong_gas Magic Show (APIO24_show) C++17
Compilation error
0 ms 0 KB
#include <bits/extc++.h>
#include "Alice.h"
//#include "Bob.h"
#define all(v) v.begin(), v.end()
#define zip(v) sort(all(v)), v.erase(unique(all(v)), v.end())
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pint;
typedef pair<ll, ll> pll;
using namespace __gnu_pbds;
template<class T> using PBDS = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<class T> using multiPBDS = tree<T, null_type,  less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

vector<pint> Alice(){
    ll x = setN(5000);
    vector<pint> edges;
    for(int i=2;i<=5000;i++) edges.push_back({x%(i-1)+1,i});
    return edges;
}
ans; 
}
#include <bits/extc++.h>
//#include "Alice.h"
#include "Bob.h"
#define all(v) v.begin(), v.end()
#define zip(v) sort(all(v)), v.erase(unique(all(v)), v.end())
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pint;
typedef pair<ll, ll> pll;
using namespace __gnu_pbds;
template<class T> using PBDS = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<class T> using multiPBDS = tree<T, null_type,  less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;


ll Bob(vector<pint> edges){
    ll ans=0, lc=1;
	for(auto& [u, v]:edges) {
        //v-1로 나눈 나머지가 u-1..
        u--, v--;
        while(ans%v!=u) ans+=lc;
        lc=lc*v/__gcd(lc,(ll)v);
	}
	return ans; 
}

Compilation message

Alice.cpp:21:1: error: 'ans' does not name a type; did you mean 'abs'?
   21 | ans;
      | ^~~
      | abs
Alice.cpp:22:1: error: expected declaration before '}' token
   22 | }
      | ^