답안 #938239

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
938239 2024-03-05T03:28:30 Z vjudge1 One-Way Streets (CEOI17_oneway) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define ll long long
#define str string
#define ins insert
#define ld long double
#define pb push_back
#define pf push_front
#define pof pop_front()
#define pob pop_back()
#define lb lower_bound
#define ub upper_bound
#define endl "\n"
#define fr first
#define sc second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define sz size()
#define vll vector<ll>
#define bc back()
#define arr array
#define pll vector<pair<ll,ll>>
using namespace std;/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type,less_equal<ll>, rb_tree_tag,tree_order_statistics_node_update>*/
template<class S,class T>
bool chmin(S &a,const T &b) {
	return a>b?(a=b)==b:false;
}
template<class S,class T>
bool chmax(S &a,const T &b) {
	return a<b?(a=b)==b:false;
}
//void fre(string s){freopen((s+".in").c_str(),"r",stdin);freopen((s+".out").c_str(),"w",stdout);}
void start(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}
const ll inf=1e18;
const ll mod=998244353;
const ll N=1e5+5;
const ld eps=1e-9;
vector<set<pair<ll,ll>>> g(N);
char ans[N];
void solve(){
    ll i,j;
    ll a,b,c;
    cin>>n>>m;
    for(i=1;i<=m;i++){
        cin>>a>>b>;
        if(mp[{a,b}]){
            if(mp[{a,b}]==1){
                ll id=g[a].lb({b,0})->sc;
                g[a].erase(g[a].lb({b,0}));
                g[b].erase(g[b].lb({a,0}));
            }
            ans[id]='B';
            ans[i]='B';
            continue;
        }
        g[a].ins({b,i});
        g[b].ins({a,i});
        
    }
    set<pair<ll,ll>> st;
    for(i=1;i<=n;i++){
        st.ins({g[i].sz,i});
    }
    bool 
    while(st.sz){
        
    }
}

signed main(){
	start();
    ll t=1;
    //cin>>t;
    while(t--) solve();
    return 0;
}
/*





*/

Compilation message

oneway.cpp: In function 'void solve()':
oneway.cpp:50:10: error: 'n' was not declared in this scope
   50 |     cin>>n>>m;
      |          ^
oneway.cpp:50:13: error: 'm' was not declared in this scope
   50 |     cin>>n>>m;
      |             ^
oneway.cpp:52:19: error: expected primary-expression before ';' token
   52 |         cin>>a>>b>;
      |                   ^
oneway.cpp:53:12: error: 'mp' was not declared in this scope
   53 |         if(mp[{a,b}]){
      |            ^~
oneway.cpp:55:20: warning: unused variable 'id' [-Wunused-variable]
   55 |                 ll id=g[a].lb({b,0})->sc;
      |                    ^~
oneway.cpp:59:17: error: 'id' was not declared in this scope; did you mean 'i'?
   59 |             ans[id]='B';
      |                 ^~
      |                 i
oneway.cpp:72:5: error: expected unqualified-id before 'while'
   72 |     while(st.sz){
      |     ^~~~~
oneway.cpp:48:10: warning: unused variable 'j' [-Wunused-variable]
   48 |     ll i,j;
      |          ^
oneway.cpp:49:12: warning: unused variable 'c' [-Wunused-variable]
   49 |     ll a,b,c;
      |            ^