criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

typedef pair<int, int> P;

int n, m;
const int N_MAX = 100005;
const int INF = 1000000005;

vector<P> BOMB;
vector<P> G[N_MAX];
int X[N_MAX];

int used[N_MAX];
vector<int> ANS;
int dfs(int k){
    used[k] = 1;
    int r = X[k];
    for(auto e: G[k]){
        if (used[e.first])continue;
        int res = dfs(e.first);
        if (res){
            ANS.push_back(e.second);
            r ^= res;
        }
    }
    return r;
}


int main(){
    cin >> n >> m;
    BOMB.resize(n+2);
    BOMB[0] = make_pair(0, 0);
    BOMB[n+1] = make_pair(INF, 0);
    for(int i = 1; i <= n; i++){
        cin >> BOMB[i].first >> BOMB[i].second;
    }
    sort(BOMB.begin(), BOMB.end());
    for(int i = 1; i <= n+1; i++)X[i] = BOMB[i].second ^ BOMB[i-1].second;
    for(int j = 1; j <= m; j++){
        int l, r;
        cin >> l >> r;
        l = lower_bound(BOMB.begin(), BOMB.end(), P(l, 0)) - BOMB.begin();
        r = upper_bound(BOMB.begin(), BOMB.end(), P(r, 1)) - BOMB.begin();
        G[l].emplace_back(r, j);
        G[r].emplace_back(l, j);
    }

    memset(used, 0, sizeof(used));
    for(int i = 1; i <= n; i++){
        if (used[i])continue;
        if (dfs(i)){
            cout << -1 << endl;
            return 0;
        }
    }

    sort(ANS.begin(), ANS.end());
    cout << ANS.size() << endl;
    for(auto a: ANS)cout << a << " ";
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:5: error: 'memset' was not declared in this scope
   52 |     memset(used, 0, sizeof(used));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define rrep(i, a, b) for (int i = a; i >= (b); i--)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
   if (a > b) {
      a = b;
      return true;
   }
   return false;
}
template <class T>
inline bool chmax(T& a, T b) {
   if (a < b) {
      a = b;
      return true;
   }
   return false;
}
void hr() {
   cerr << "--------------" << endl;
}
const int INF = 1001001001;
const int MOD = 1000000007;
// const int MOD = 998244353;

const int MAX = 100005;
vector<P> g[MAX];
int x[MAX];
bool used[MAX];
vector<int> ans;
int dfs(int v) {
   used[v] = true;
   int res = x[v];
   for (P e : g[v]) {
      if (used[e.first]) continue;
      int r = dfs(e.first);
      if (r) ans.push_back(e.second);
      res ^= r;
   }
   return res;
}

int main() {
   cin.tie(0);
   ios_base::sync_with_stdio(0);

   int n, m;
   cin >> n >> m;
   vector<P> a(n);
   rep(i, 0, n) cin >> a[i].first >> a[i].second;
   sort(a.begin(), a.end());
   x[0] = a[0].second;
   rep(i, 0, n - 1) x[i + 1] = a[i].second ^ a[i + 1].second;
   x[n] = a[n - 1].second;

   rep(i, 0, m) {
      int l, r;
      cin >> l >> r;
      l = lower_bound(a.begin(), a.end(), P(l, 0)) - a.begin();
      r = upper_bound(a.begin(), a.end(), P(r, 1)) - a.begin();
      g[l].emplace_back(r, i + 1);
      g[r].emplace_back(l, i + 1);
   }
   rep(i, 0, n + 1) {
      if (used[i]) continue;
      if (dfs(i)) {
         cout << -1 << endl;
         return 0;
      }
   }
   cout << ans.size() << endl;
   sort(ans.begin(), ans.end());
   rep(i, 0, ans.size())
       printf("%d%c", ans[i], i == ans.size() - 1 ? '\n' : '');
   return 0;
}

Compiler output:
a.cc:79:60: error: empty character constant
   79 |        printf("%d%c", ans[i], i == ans.size() - 1 ? '\n' : '');
      |                                                            ^~
Language: C++

#include <bits/stdc++.h>

#ifdef NON_SUBMIT
#define TEST(n) (n)
#define tout cerr
#else
#define TEST(n) ((void)0)
#define tout cin
#endif

using namespace std;

vector<pair<int,int>> qry;
pair<int,int> A[100000];
priority_queue<tuple<int,int,int>> S[100000];
int parent[100000], V[100000], tree[100001], color[100000];
bool chk[100000];

int find_(int a)
{
	return color[a]=a==color[a] ? a:find_(color[a]);
}

void union_(int a, int b)
{
	a=find_(a); b=find_(b);
	if(S[a].size()<S[b].size()) swap(a,b);
	while(S[b].size()) {
		S[a].push(S[b].top());
		S[b].pop();
	}
	color[b]=a;
}

void update(int n, int v)
{
	for(++n;n<=100000;n+=n&-n) tree[n]^=v;
}

int get_value(int n)
{
	int ret=0;
	for(++n;n;n-=n&-n) ret^=tree[n];
	return ret;
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);
	TEST(freopen("input.txt","r",stdin));
	TEST(freopen("output.txt","w",stdout));
	TEST(freopen("debug.txt","w",stderr));
	int N, M, v, o, j;
	vector<int> ans;
	cin>>N>>M;
	for(int i=0;i<N;i++) cin>>A[i].first>>A[i].second;
	sort(A,A+N);
	for(int i=0;i<N;i++) if(A[parent[i]=color[i]=i].second) {
		update(i,1);
		update(i+1,1);
	}
	for(int i=1;i<=M;i++) {
		int l, r;
		cin>>l>>r;
		l=lower_bound(A,A+N,make_pair(l,0))-A;
		r=upper_bound(A,A+N,make_pair(r,1))-A-1;
		if(l<=r) S[l].emplace(-r,l,i);
	}
	for(int i=0;i<N;i++) {
		if(S[find_(i)].empty()) {
			if(get_value(i)) {
				cout<<"-1\n";
				return 0;
			}
			continue;
		}
		tie(v,o,j)=S[find_(i)].top();
		S[find_(i)].pop(); v=-v;
		if(get_value(i)) {
			qry.emplace_back(o,i);
			update(i,1);
			update(v+1,1);
		}
		if(v+1<N) {
			while(S[find_(i)].size() && get<0>(S[find_(i)].top())==-v) S[find_(i)].pop();
			union_(i,v+1);
			parent[i]=v+1;
		}
		V[i]=j;
	}
	for(auto v: qry) {
		chk[v.first]^=1;
		if(parent[v.second]^r) chk[parent[v.second]]^=1;
	}
	for(int i=0;i<N;i++) {
		if(parent[i]^i) chk[parent[i]]^=chk[i];
		if(chk[i]) ans.push_back(V[i]);
	}
	sort(ans.begin(),ans.end());
	cout<<ans.size()<<'\n';
	for(auto a: ans) cout<<a<<' ';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:37: error: 'r' was not declared in this scope
   94 |                 if(parent[v.second]^r) chk[parent[v.second]]^=1;
      |                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N=100010,M=200010;
int n,m,x,y,vis[N],etot;
map<long long,int> e,vise,visee;
long long enam[M];
struct vertice{
	int coor;
	vector<int> to;
	int parity,s;
} v[N];
bool cmp(const vertice &x,const vertice &y){
	return x.coor<y.coor;
}
long long hash(int x,int y){
	if(x>y) swap(x,y);
	return (((long long)x<<30)+y);
}
int bs(int x){
	int l=1,r=n,mid;
	while(l<=r){
		mid=(l+r)/2;
		if(v[mid].coor<=x) l=mid+1;
		else r=mid-1;
	}
	return r;
}
bool dfs(int x){
	//printf("x=%d\n",x);
	for(int i=0;i<v[x].to.size();++i){
		int to=v[x].to[i];
		long long h=hash(x,to);
		if(visee[h]) continue;
		//printf("x=%d,to=%d\n",x,to);
		vise[h]^=1;
		visee[h]=1;
		if(v[to].parity&&!vis[to]){
			vis[to]=1;
			//printf("!!!to=%d\n",to);
			return true;
		}
		else{
			if(dfs(to)) return true;
			else{
				vise[h]^=1;
				visee[h]=0;
				//printf("clear x=%d,to=%d\n",x,to);
			}
		}
	}
	return false;
}
bool dfstot(){
	memset(vis,0,sizeof(vis));
	for(int i=1;i<=n;++i){
		visee.clear();
		if(vis[i]||!v[i].parity) continue;
		vis[i]=1;
		//printf("i=%d\n",i);
		if(!dfs(i)) return false;
	}
	return true;
}
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;++i){
		scanf("%d%d",&x,&y);
		v[i].coor=x;
		v[i].s=y;
	}
	sort(v+1,v+n+1,cmp);
	for(int i=0;i<=n;++i) v[i].parity=v[i].s==v[i+1].s?0:1;
	//for(int i=0;i<=n;++i) printf("v[%d].coor=%d,v[%d].parity=%d\n",i,v[i].coor,i,v[i].parity);
	for(int i=1;i<=m;++i){
		scanf("%d%d",&x,&y);
		x=bs(x-1);y=bs(y);
		long long h=hash(x,y);
		if(e[h]) continue;
		e[h]=1;
		enam[i]=h;
		v[x].to.push_back(y);
		v[y].to.push_back(x);
		//printf("x=%d,y=%d\n",x,y);
	}
	if(dfstot()){
		int num=0;
		for(int i=1;i<=m;++i){
			if(vise[enam[i]]) ++num;
		}
		printf("%d\n",num);
		for(int i=1;i<=m;++i){
			if(vise[enam[i]]) printf("%d ",i);
		}
	}
	else printf("-1");
	return 0;
}

Compiler output:
a.cc: In function 'bool dfs(int)':
a.cc:32:29: error: reference to 'hash' is ambiguous
   32 |                 long long h=hash(x,to);
      |                             ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:15:11: note:                 'long long int hash(int, int)'
   15 | long long hash(int x,int y){
      |           ^~~~
a.cc: In function 'int main()':
a.cc:78:29: error: reference to 'hash' is ambiguous
   78 |                 long long h=hash(x,y);
      |                             ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:15:11: note:                 'long long int hash(int, int)'
   15 | long long hash(int x,int y){
      |           ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N=100010,M=200010;
int n,m,x,y,vis[N],etot;
map<long long,int> e,vise,visee;
long long enam[M];
struct vertice{
	int coor;
	vector<int> to;
	int parity,s;
} v[N];
bool cmp(const vertice &x,const vertice &y){
	return x.coor<y.coor;
}
long long hash(int x,int y){
	if(x>y) swap(x,y);
	return (((long long)x<<30)+y);
}
int bs(int x){
	int l=1,r=n,mid;
	while(l<=r){
		mid=(l+r)/2;
		if(v[mid].coor<=x) l=mid+1;
		else r=mid-1;
	}
	return r;
}
bool dfs(int x){
	//printf("x=%d\n",x);
	for(int i=0;i<v[x].to.size();++i){
		int to=v[x].to[i];
		long long h=hash(x,to);
		if(visee[h]) continue;
		//printf("x=%d,to=%d\n",x,to);
		vise[h]^=1;
		visee[h]=1;
		if(v[to].parity&&!vis[to]){
			vis[to]=1;
			//printf("!!!to=%d\n",to);
			return true;
		}
		else{
			if(dfs(to)) return true;
			else{
				vise[h]^=1;
				visee[h]=0;
				//printf("clear x=%d,to=%d\n",x,to);
			}
		}
	}
	return false;
}
bool dfstot(){
	memset(vis,0,sizeof(vis));
	for(int i=1;i<=n;++i){
		visee.clear();
		if(vis[i]||!v[i].parity) continue;
		vis[i]=1;
		//printf("i=%d\n",i);
		if(!dfs(i)) return false;
	}
	return true;
}
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;++i){
		scanf("%d%d",&x,&y);
		v[i].coor=x;
		v[i].s=y;
	}
	sort(v+1,v+n+1,cmp);
	for(int i=0;i<=n;++i) v[i].parity=v[i].s==v[i+1].s?0:1;
	//for(int i=0;i<=n;++i) printf("v[%d].coor=%d,v[%d].parity=%d\n",i,v[i].coor,i,v[i].parity);
	for(int i=1;i<=m;++i){
		scanf("%d%d",&x,&y);
		x=bs(x-1);y=bs(y);
		long long h=hash(x,y);
		if(e[h]) continue;
		e[h]=1;
		enam[i]=h;
		v[x].to.push_back(y);
		v[y].to.push_back(x);
		//printf("x=%d,y=%d\n",x,y);
	}
	if(dfstot()){
		for(int i=1;i<=m;++i){
			if(vise[enam[i]]) printf("%d ",i);
		}
	}
	else printf("-1");
	return 0;
}

Compiler output:
a.cc: In function 'bool dfs(int)':
a.cc:32:29: error: reference to 'hash' is ambiguous
   32 |                 long long h=hash(x,to);
      |                             ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:15:11: note:                 'long long int hash(int, int)'
   15 | long long hash(int x,int y){
      |           ^~~~
a.cc: In function 'int main()':
a.cc:78:29: error: reference to 'hash' is ambiguous
   78 |                 long long h=hash(x,y);
      |                             ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:15:11: note:                 'long long int hash(int, int)'
   15 | long long hash(int x,int y){
      |           ^~~~
Language: C++

さっきの提出、嘘解法だった……


Compiler output:
a.cc:1:1: error: extended character 、 is not valid in an identifier
    1 | さっきの提出、嘘解法だった……
      | ^
a.cc:1:1: error: extended character … is not valid in an identifier
a.cc:1:1: error: extended character … is not valid in an identifier
a.cc:1:1: error: '\U00003055\U00003063\U0000304d\U0000306e\U000063d0\U000051fa\U00003001\U00005618\U000089e3\U00006cd5\U00003060\U00003063\U0000305f\U00002026\U00002026' does not name a type
    1 | さっきの提出、嘘解法だった……
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream> // cin, cout, cerr
#include <algorithm> // minmax, sort, swap
#include <numeric> // iota
#include <cstdio> // printf, scanf
#include <string> // string, stoi, to_string
#include <vector> // vector
#include <queue> // queue, priority_queue
#include <deque> // deque
#include <map> // key-value pairs sorted by keys
#include <set> // set
#include <iomanip> // cout<<setprecision(n)
#include <functional> // function<void(int)>
#include <cmath>

#ifdef DEBUG
#include "debug.hpp"
#else
#define debug(...)
#endif

#define int long long // at least int64 > 9*10^18
#define ENDL '\n'
#define rep(i,n) for(int i = 0; i < (n); i++)
#define print(i) std::cout << (i) << '\n'
#define all(v) (v).begin(), (v).end()
/* libraries */

signed main() {
	int n,m;
	std::cin >> n >> m;
	std::vector<std::pair<int,int> > bombs;
	bombs.reserve(n);
	rep(i,n) {
		int a,b;
		std::cin >> a >> b;
		bombs.emplace_back(a,b);
	}
	std::vector<std::pair<int,int> > codes;
	rep(i,m) {
		int a,b;
		std::cin >> a >> b;
		codes.emplace_back(a,b);
	}
	std::sort(all(bombs));
	std::vector<int> xors(n+1);
	xors[0] = bombs[0].second; xors[n] = bombs[n-1].second;
	rep(i,n-1) {
		xors[i+1] = bombs[i].second^bombs[i+1].second;
	}
	debug(xors);
	std::map<std::pair<int,int>, int> map;
	std::vector<std::vector<int> > g(n+1,std::vector<int>());
	std::vector<int> bombs2(n);
	rep(i,n) {
		bombs2[i] = bombs[i].first;
	}
	debug(bombs2);
	rep(i,m) {
		int a = std::lower_bound(all(bombs2),codes[i].first)-bombs2.begin();
		int b = std::upper_bound(all(bombs2),codes[i].second)-bombs2.begin();
		map[std::make_pair(a,b)] = i;
		map[std::make_pair(b,a)] = i;
		if(a==b) continue;
		g[a].emplace_back(b);
		g[b].emplace_back(a);
	}
	debug(n,m);
	std::set<int> set;
	std::vector<int> went(n+1,false);
	auto dfs = [&] (auto f, int i, int par) -> int {
		int impossible = false;
		went[i]=true;
		debug(i,par);
		for(int to: g[i]) {
			if(went[to]) continue;
			if(dfs(f,to,i)) impossible = true;
		}
		if(xors[i]) {
			if(par==-1) return 1;
			xors[par]^=1;
			set.emplace(map[std::make_pair(i,par)]);
		}
		return impossible;
	};
	debug(went);
	rep(i,n+1) {
		if(went[i]) continue;
		went[i]=true;
		if(dfs(dfs,i,-1)) {
			print(-1);
			return 0;
		}
	}
	print(set.size());
	for(auto x:set) {
		std::cout << x+1 << ' ';
	}
	std::cout << ENDL;
	return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:76:28: error: use of 'dfs' before deduction of 'auto'
   76 |                         if(dfs(f,to,i)) impossible = true;
      |                            ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

const int N = 2e5 + 10;
#define pii pair<int,int>
#define pb push_back
struct node {
    int a, b;
} x[N], t[N];
int n, q, b[N];
bool ans[N], st[N], vis[N];
vector<pii> G[N];
int get(int u) { return lower_bound(b + 1, b + n + 1, u) - b; }
int getl(int u) { return upper_bound(b + 1, b + n + 1, u) - b - 1; }
void link(int u, int v, int w) { G[u].pb(pii(v, w)); G[v].pb(pii(u, w)); }
int dfs(int u) {
    vis[u] = 1; int x = st[u];
    for(auto v : G[u]) if(!vis[v.fs]) {
        if(dfs(v.fs)) { ans[v.sc] = 1; x ^= 1; }
    }
    return x;
}
int main() {
    scanf("%d%d", &n, &q);
    for(int i = 1; i <= n; i ++) { scanf("%d%d", &x[i].a, &x[i].b); b[i] = x[i].a; }
    for(int i = 1; i <= q; i ++) scanf("%d%d", &t[i].a, &t[i].b);
    sort(b + 1, b + n + 1);
    for(int i = 1; i <= n; i ++) { x[i].a = get(x[i].a); st[x[i].a] = x[i].b; }
    for(int i = n + 1; i >= 1; i --) st[i] ^= st[i - 1];
    for(int i = 1; i <= q; i ++) link(get(t[i].a), 1 + getl(t[i].b), i);
    for(int i = 1; i <= n + 1; i ++) if(!vis[i]) {
        if(dfs(i)) { puts("-1"); return 0; }
    }
    int r = 0;
    for(int i = 1; i <= q; i ++) r += ans[i];
    printf("%d\n", r);
    for(int i = 1; i <= q; i ++) if(ans[i]) printf("%d ", i);
    return 0;
} 

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:18:34: error: 'struct std::pair<int, int>' has no member named 'fs'
   18 |     for(auto v : G[u]) if(!vis[v.fs]) {
      |                                  ^~
a.cc:19:18: error: 'struct std::pair<int, int>' has no member named 'fs'
   19 |         if(dfs(v.fs)) { ans[v.sc] = 1; x ^= 1; }
      |                  ^~
a.cc:19:31: error: 'struct std::pair<int, int>' has no member named 'sc'
   19 |         if(dfs(v.fs)) { ans[v.sc] = 1; x ^= 1; }
      |                               ^~
Language: C++

#include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = std::int_fast64_t;
using std::cout;
using std::cerr;
using std::endl;
using std::cin;

template<typename T>
std::vector<T> make_v(size_t a){return std::vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

int main() {
	int n, m; scanf("%d%d", &n, &m);
	std::vector<int> a(n), b(n), l(m), r(m);
	for(int i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
	for(int i = 0; i < m; i++) scanf("%d%d", &l[i], &r[i]);

	std::vector<int> latte = a; sort(begin(latte), end(latte));
	latte.push_back(1 << 30);
	
	std::string s(n, '0');
	for(int i = 0; i < n; i++) {
		int ni = lower_bound(begin(latte), end(latte), a[i]) - begin(latte);

		s[ni] = b[i] + '0';
	}
	std::vector<int> L(m), R(m);
	for(int i = 0; i < m; i++) {
		int nl = lower_bound(begin(latte), end(latte), l[i]) - begin(latte);
		int nr = upper_bound(begin(latte), end(latte), r[i]) - begin(latte);

		L[i] = nl;
		R[i] = nr;
		if(nl == nr) L[i] == -1;
	}

	#ifndef NDEBUG
	cout << s << endl;
	for(int i = 0; i < m; i++) cout << i + 1 << ": [" << L[i] << " " << R[i] << ")\n";
	#endif

	// solve
	std::vector<int> ans;
	std::vector<std::pair<int, int>> vec;
	for(int i = 0; i < m; i++) if(L[i] != -1) vec.push_back({R[i], i});
	sort(begin(vec), end(vec));

	わかりません:(

	// answer
	sort(begin(ans), end(ans));
	if(*max_element(begin(b), end(b)) == 0) {
		printf("0\n");
		return 0;
	}
	if(ans.empty()) {
		printf("-1\n\n");
		return 0;
	}
	printf("%d\n", ans.size());
	for(auto id: ans) printf("%d ", id + 1);
	printf("\n");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:35: error: expected ')' before ';' token
   56 |         sort(begin(ans), end(ans));
      |                                   ^
      |                                   )
a.cc:53:22: note: to match this '('
   53 |         わかりません:(
      |                      ^
Language: C++

左端をそろわないようにいい感じにする

Compiler output:
a.cc:1:1: error: '\U00005de6\U00007aef\U00003092\U0000305d\U0000308d\U0000308f\U0000306a\U00003044\U00003088\U00003046\U0000306b\U00003044\U00003044\U0000611f\U00003058\U0000306b\U00003059\U0000308b' does not name a type
    1 | 左端をそろわないようにいい感じにする
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>

int main(){
	
	char str1[10], str2[10], trash[10];
	int balls1, balls2;
	
	scanf("%s %s", str1, str2);
	scanf("%d %d", balls1, balls2);
	scanf("%s", trash);
	
	(strcmp(trash, str1) == 0) ? balls1-- : balls2--;
	printf("%d %d\n", balls1, balls2);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: 'strcmp' was not declared in this scope
   12 |         (strcmp(trash, str1) == 0) ? balls1-- : balls2--;
      |          ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <bits/stdc++.h>
useng namespace std;
int main(){
 string s,t;
 cin>>s>>t;
 int a,b;
 cin>>a>>b;
 string u;
 cin>>u;
 if(s==u)a--;
 else b--;
 cout<<a<<" "<<b<<endl;
return 0;}

Compiler output:
a.cc:2:1: error: 'useng' does not name a type
    2 | useng namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:4:2: error: 'string' was not declared in this scope
    4 |  string s,t;
      |  ^~~~~~
a.cc:4:2: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |  cin>>s>>t;
      |  ^~~
      |  std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:7: error: 's' was not declared in this scope
    5 |  cin>>s>>t;
      |       ^
a.cc:5:10: error: 't' was not declared in this scope; did you mean 'tm'?
    5 |  cin>>s>>t;
      |          ^
      |          tm
a.cc:8:8: error: expected ';' before 'u'
    8 |  string u;
      |        ^~
      |        ;
a.cc:9:7: error: 'u' was not declared in this scope
    9 |  cin>>u;
      |       ^
a.cc:12:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |  cout<<a<<" "<<b<<endl;
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |  cout<<a<<" "<<b<<endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <string.h>

int main()
{
  char str1[15], str2[15], trash1[15];
  int balls1, balls2;

  scanf("%s %s", str1, str2);
  scanf("%d %d", &balls1, &balls2);
  scanf("%s", trash);

  (strcmp(trash1, str1) == 0) ? balls1-- : balls2--;
  printf("%d %d\n", balls1, balls2);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'trash' was not declared in this scope; did you mean 'trash1'?
   11 |   scanf("%s", trash);
      |               ^~~~~
      |               trash1
Language: C

#include <stdio.h>
#include <string.h>

int main() {
  char S[15];
  char T[15];
  char U[15];
  int A, B;

  scanf("%s %s", S, T);
  scanf("%d %d", &A, &B);
  scanf("%s", U);

  if (S[0] == U[0]) {
  printf("%d %d\n" A-1, B);
  }
  else if (T[0] == U[0]) {
  printf ("%d %d\n", A, B-1);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:19: error: expected ')' before 'A'
   15 |   printf("%d %d\n" A-1, B);
      |         ~         ^~
      |                   )
Language: C

#include <stdio.h>
#include <string.h>

int main() {
  char S[15], T[15], U[15];
  int A, B;

  scanf("%s %s", S, T);
  scanf("%d %d", &A, &B);
  scanf("%s", U);

  if (S[0] == U[0]) {
  printf("%d %d\n" A-1, B);
  }
  else if (T[0] == U[0]) {
  printf ("%d %d\n", A, B-1);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:19: error: expected ')' before 'A'
   13 |   printf("%d %d\n" A-1, B);
      |         ~         ^~
      |                   )
Language: C++

#include <stdio.h>
#include <string.h>

int main() {
  char S[15], T[15], U[15];
  int A, B;

  scanf("%s %s", S, T);
  scanf("%d %d", &A, &B);
  scanf("%s", U);

  if (S[0] == U[0]) {
  printf("%d %d\n" A-1, B);
  }
  else if (T[0] == U[0]) {
  printf ("%d %d\n", A, B-1);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected ')' before 'A'
   13 |   printf("%d %d\n" A-1, B);
      |         ~         ^~
      |                   )
Language: C

#include <stdio.h>
#include <string.h>
 
int main(){

	char S[20], T[20], U[20];

	int A, B;
	
	scanf("%s %s", S, T);
	scanf("%d %d", &A, &B);
	scanf("%s", U);
	if(strcmp(U,S) == 0)
	{
		printf("%d %d",A - 1,B);
	}
	if(strcmp(U,T) == 0)
	{
		printf("%d %d",A,B - 1);
	}
	
	return 0;	

Compiler output:
main.c: In function 'main':
main.c:22:9: error: expected declaration or statement at end of input
   22 |         return 0;
      |         ^~~~~~
Language: C++

#include<stdio.h>

int main()
{
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	if((a==c&&b==a&&b==c) || (a!=c&&b!=c));
	printf("No");
	else
	printf("Yes");
	
	return 0 ;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else
      |         ^~~~
Language: C++

#include<stdio.h>

int main()
{
	int S, T, num1, num2, U;
	scanf("%s %s %d %d %s", &S, &T, &num1, &num2,&U);
	if(U=num1=S)
		printf("num1-1");
	}
	else if(U=num2=T)
	{
		printf("num2-1");
	}

	
	return 0;
}

Compiler output:
a.cc:10:9: error: expected unqualified-id before 'else'
   10 |         else if(U=num2=T)
      |         ^~~~
a.cc:16:9: error: expected unqualified-id before 'return'
   16 |         return 0;
      |         ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
	
	char S[15];
	char T[15];
	char U[15];
	
	int A;
	int B;
	
	scanf("%s %s",S,T);
	
	scanf("%d %d",&A,&B);
	
	scanf("%s",U);
	
	
	if(strcmp(U,S)==0){
		printf("%d %d\n",A-1,B);
	}
	else if(strcmp(U,T)==0){
		printf("%d %d\n",A,B-1);
	}
	
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: expected '}' at end of input
   26 |         return 0;
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

int main(){
	char T[11];
	char S[11];
	
		scanf("%d %d",T,S);
		
		int b,a;
		
		scanf("%d %d",&b,&a);
		
	char N[10];
	scanf("%s",N);
	
		if(strcmp(S,N)==0){
			printf("%d %d", a-1,b);
		}
		if(strcmp(T,N)==0){
			printf("%d %d", a,b-1);
		}
		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%d %d",T,S);
      |                 ^~~~~
a.cc:14:20: error: 'strcmp' was not declared in this scope
   14 |                 if(strcmp(S,N)==0){
      |                    ^~~~~~
a.cc:1:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(){
a.cc:15:25: error: 'printf' was not declared in this scope
   15 |                         printf("%d %d", a-1,b);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:17:20: error: 'strcmp' was not declared in this scope
   17 |                 if(strcmp(T,N)==0){
      |                    ^~~~~~
a.cc:17:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:18:25: error: 'printf' was not declared in this scope
   18 |                         printf("%d %d", a,b-1);
      |                         ^~~~~~
a.cc:18:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>
#include<string.h>

int main(){
	char a[11], b[11], c[11]
	int d, e;
	scanf("%s %s\n", &a, &b);
	scanf("%d %d\n", &d, &e);
	scanf("%s", &c);
	
	if(strcmp(a, c) == 0) {
		printf("%d %d", d - 1, e);
	}
	else if (strcmp(b, c) == 0) {
	}
		printf("%d %d", d, e - 1);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'int'
    6 |         int d, e;
      |         ^~~
a.cc:8:27: error: 'd' was not declared in this scope
    8 |         scanf("%d %d\n", &d, &e);
      |                           ^
a.cc:8:31: error: 'e' was not declared in this scope
    8 |         scanf("%d %d\n", &d, &e);
      |                               ^
a.cc:9:22: error: 'c' was not declared in this scope
    9 |         scanf("%s", &c);
      |                      ^
Language: C

#include <stdio.h>
#include <string.h>
int main(){
char S[11];
char T[11];
scanf("%s %s",S,T);
int a,b;
scanf("%d %d,&a,&b);
char N[10];
scanf("%s" , N);
if(strcmp(N,S)==0) printf("%d %d",a-1,b);
if(strcmp(N,T)==0) printf("%d %d",a,b-1);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:7: warning: missing terminating " character
    8 | scanf("%d %d,&a,&b);
      |       ^
main.c:8:7: error: missing terminating " character
    8 | scanf("%d %d,&a,&b);
      |       ^~~~~~~~~~~~~~
main.c:9:1: error: expected expression before 'char'
    9 | char N[10];
      | ^~~~
main.c:13:10: error: expected ';' before '}' token
   13 | return 0;
      |          ^
      |          ;
   14 | }
      | ~
Language: C++

#include<stdio.h>
#include<string.h>

int main(){
	char a[11], b[11], c[11];
	int d, e;
	scanf("%s %s\n", &a, &b);
	scanf("%d %d\n", &d, &e);
	scanf("%s", &c);
	
	if(strcmp(a, c) == 0) {
		printf("%d %d", d - 1, e);
	}
	else if (strcmp(b, c) == 0) {
	}
		printf("%d %d", d, e - 1);
	}
	
	return 0;
}

Compiler output:
a.cc:19:9: error: expected unqualified-id before 'return'
   19 |         return 0;
      |         ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

int main(){
  int A, B;
  scanf("%d %d", &A, &B);

  char S[20],T[20], U[20];

  scanf(" %s", S);
  
  scanf(" %s", T);
  
  scanf(" %s", U);

  if(strcmp(S,U)==0){
    A= A-1;
    printf("%d", A);
  }
  else if(strcmp(T,U)==0){
    B=B-1;
    printf("%d", B);
  }else{}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d %d", &A, &B);
      |   ^~~~~
a.cc:13:6: error: 'strcmp' was not declared in this scope
   13 |   if(strcmp(S,U)==0){
      |      ^~~~~~
a.cc:1:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(){
a.cc:15:5: error: 'printf' was not declared in this scope
   15 |     printf("%d", A);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:19:5: error: 'printf' was not declared in this scope
   19 |     printf("%d", B);
      |     ^~~~~~
a.cc:19:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>

int main(){
  int A, B;
  scanf("%d %d", &A, &B);

  char S[100];
  scanf(" %[^a ]", S);
  getchar();

  char T[100];
  scanf(" %[^a ]", T);
  getchar();
  
  char U[100];
  scanf(" %[^a ]", U);
  getchar();

  if(strcmp(S,U)==0){
    A= A-1;
    printf("%d", A);
  }
  else if(strcmp(T,U)==0){
    B=B-1;
    printf("%d", B);
  }else{}
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:6: error: 'strcmp' was not declared in this scope
   19 |   if(strcmp(S,U)==0){
      |      ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <stdio.h>
#include <string.h>

int main(){
  int A, B;
  scanf("%d", &A);
  scanf("%d", &B);
  char S[20];
  scanf("%[^a ]", S);
  char T[20];
  scanf("%[^a ]", T);
  char U[20];
  scanf("%[^a ]", U);
  if((int)U==(int)S){
    A= A-1;
    printf("%d", A);
  }
  else if((int)U==(int)T){
    B=B-1;
    printf("%d", B);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   14 |   if((int)U==(int)S){
      |      ^~~~~~
a.cc:14:14: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   14 |   if((int)U==(int)S){
      |              ^~~~~~
a.cc:18:11: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   18 |   else if((int)U==(int)T){
      |           ^~~~~~
a.cc:18:19: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   18 |   else if((int)U==(int)T){
      |                   ^~~~~~
Language: C++

#include <stdio.h>
#include<string.h>
 
 
int main ()
{
int A,B,index;
char S[11],T[11],U[11];
 
scanf("%s %s", &S, &T);
scanf("%d %d", &A, &B);
scanf("%s", &U);
 
 
if (strcmp(U,S)==0){
	A--;
	printf("%d %d", A, B);
 
}
else if(strcmp(U,T)==0){
B--;
printf("%d %d", A, B);
 
}
 
 
	return 0;
	}
#include <stdio.h>
#include<string.h>


int main ()
{
int A,B,index;
char S[11],T[11],U[11];

scanf("%s %s", &S, &T);
scanf("%d %d", &A, &B);
scanf("%s", &U);


if (strcmp(U,S)==0){
	A--;
	printf("%d %d", A, B);

}
else if(strcmp(U,T)==0){
B--;
printf("%d %d", A, B);

}


	return 0;
	}
Submission Info
Submission Time

Compiler output:
a.cc:33:5: error: redefinition of 'int main()'
   33 | int main ()
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main ()
      |     ^~~~
a.cc:57:1: error: 'Submission' does not name a type
   57 | Submission Info
      | ^~~~~~~~~~
Language: C++

#include <stdio.h>
#include <string.h>
int main(){
	char S[21], T[21], U[21];
	int A, B;
	scanf("%s %s", &S, &T);
	scanf("%d %d", &A, &B);
	scanf("%s", &U);
	
	if(strcamp(S, U)){printf("%d, %d", A - 1, B); 
	}
	else if(strcamp(T, U)){printf("%d, %d", A, B - 1);}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'strcamp' was not declared in this scope; did you mean 'strcmp'?
   10 |         if(strcamp(S, U)){printf("%d, %d", A - 1, B);
      |            ^~~~~~~
      |            strcmp
Language: C++

#include <stdio.h>
#include <string.h>
int main(){
	char S[21], T[21], U[21];
	int A, B;
	scanf("%s %s", &S, &T);
	scanf("%d %d", &A, &B);
	scanf("%s", &U);
	
	if(strcamp(S, U)){printf("%d, %d", A - 1, B); 
	}
	else if(strcamp(T, U)){printf("%d, %d", A, B - 1);}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'strcamp' was not declared in this scope; did you mean 'strcmp'?
   10 |         if(strcamp(S, U)){printf("%d, %d", A - 1, B);
      |            ^~~~~~~
      |            strcmp
Language: C++

#include <stdio.h>
#include <string.h>

int main (){
	
	char s[10], t[10], u[10];
	int a,b;
	scanf ("%s %s", s, t);
	scanf ("%d %d", &a,&b);
	getchar ();
	scanf ("%s", u );
	
	if (strcmp(	u , s )== 0){
		printf ("%d %d\n", a-1, b);
	}
	else if (strcmp(u, tredred) == 0){
		printf ("%d %d\n", a, b-1);
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:28: error: 'tredred' was not declared in this scope
   16 |         else if (strcmp(u, tredred) == 0){
      |                            ^~~~~~~
Language: C++

s,t=map(str,input().split())
a,b=map(int,input().split())
u=input()

if u==s:
    print(a-1,b)
else:
    print(a,b-1)


Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s,t=map(str,input().split())
      | ^
Language: C++

#iclude<iostream>
#include<cstring>

using namespace std;

int main()
{
  string  s,t;
  cin >> s >> t ;

  int a,b;
  cin >> a >> b ;

  string  u ;
  cin >> u ;

  if(s==u)
    --a;
  if(t==u)
    --b;

  cout << a << b ;
}







Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string  s,t;
      |   ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include<cstring>
  +++ |+#include <string>
    3 | 
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> s >> t ;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cstring>
  +++ |+#include <iostream>
    3 | 
a.cc:9:10: error: 's' was not declared in this scope
    9 |   cin >> s >> t ;
      |          ^
a.cc:9:15: error: 't' was not declared in this scope
    9 |   cin >> s >> t ;
      |               ^
a.cc:14:9: error: expected ';' before 'u'
   14 |   string  u ;
      |         ^ ~
      |         ;
a.cc:15:10: error: 'u' was not declared in this scope
   15 |   cin >> u ;
      |          ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout << a << b ;
      |   ^~~~
a.cc:22:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){ 
    string s,t;
    cin>>s>>t;
    int a,b;
    cin>>a>>b;
    string u;
    cin>>u;
    if (u==s){
        a--;
    }
    else if (u==t){
        b--;
    }
    cout<<a<<" "<<b<<endl
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected ';' before 'return'
   16 |     cout<<a<<" "<<b<<endl
      |                          ^
      |                          ;
   17 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>

#define all(a) a.begin(), a.end()
#define allr(a) a.rbegin(), a.rend()
#define rev(v) reverse(v.begin(), v.end());
#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin());
#define io() ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);srand(time(NULL));
using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

signed main(){
	io();
	string s, t; cin >> s >> t;
	int a, b;  cin >> a >> b;
	string u; cin >> u;
	if(u == "red"){
		--a;
	}else{
		--b:
	}
	cout << a << ' ' << b;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: expected ';' before ':' token
   22 |                 --b:
      |                    ^
      |                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,A) for(int i = 0;i < A;i++)

int main() {
  int A;
  cin >> A;
  int B[A];
  int C = 1;
  int count = 0;
  rep(i,A){
    cin >> B[i];
  }
  sort(B,B + A);
  rep(i,A){
    if(B[i] == B[C]){
      count++
    }
    C++;
  }
  if(count > 0){
    cout << "NO" << endl;
  }
else{
  cout << "Yes" << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before '}' token
   17 |       count++
      |              ^
      |              ;
   18 |     }
      |     ~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#define ll long long
using namespace std;
struct dog {
	string a;
	int b;
};
int main()
{
	dog shiba; dog pa;
	cin >> shiba.a >> pa.a;
	cin >> shiba.b >> pa.b;
	string key;#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#define ll long long
using namespace std;
struct dog {
	string a;
	int b;
};
int main()
{
	dog shiba; dog pa;
	cin >> shiba.a >> pa.a;
	cin >> shiba.b >> pa.b;
	string key;
	cin >> key;
	if (shiba.a == key)shiba.b -= 1;
	else if (pa.a == key)pa.b -= 1;
	cout << shiba.b << " " << pa.b;

}


	cin >> key;
	if (shiba.a == key)shiba.b -= 1;
	else if (pa.a == key)pa.b -= 1;
	cout << shiba.b << " " << pa.b;

}



Compiler output:
a.cc:16:20: error: stray '#' in program
   16 |         string key;#include<iostream>
      |                    ^
a.cc: In function 'int main()':
a.cc:16:21: error: 'include' was not declared in this scope
   16 |         string key;#include<iostream>
      |                     ^~~~~~~
a.cc:16:37: error: expected primary-expression before '>' token
   16 |         string key;#include<iostream>
      |                                     ^
a.cc:21:1: error: expected primary-expression before 'using'
   21 | using namespace std;
      | ^~~~~
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main()
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main()
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:27:1: error: a function-definition is not allowed here before '{' token
   27 | {
      | ^
Language: C++

#include<stdio.h>
#include<string.h>

int main(void){
    char S[100];
    char T[100];
    int A,B;
    char U[100];

    scanf("%s", &S);
    scanf("%s", &T);
    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%s", &U);

    if(strcmp(S, U) == 0){
        A = A - 1;
        printf("%d%d", A, B);
        puts(B);
    }else if(strcmp(T, U) == 0){
        B = B - 1;
        printf("%d%d", A, B);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   19 |         puts(B);
      |              ^
      |              |
      |              int
In file included from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include<stdio.h>
#include<string.h>

int main(void){
    char S[100];
    char T[100];
    int A,B;
    char U[100];

    scanf("%s", &S);
    scanf("%s", &T);
    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%s", &U);

    if(strcmp(S, U) == 0){
        puts(A - 1);
        puts(B);
    }else if(strcmp(T, U) == 0){
        puts(A);
        puts(B - 1);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   17 |         puts(A - 1);
      |              ~~^~~
      |                |
      |                int
In file included from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:18:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   18 |         puts(B);
      |              ^
      |              |
      |              int
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:20:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   20 |         puts(A);
      |              ^
      |              |
      |              int
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
a.cc:21:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   21 |         puts(B - 1);
      |              ~~^~~
      |                |
      |                int
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include<stdio.h>
#include<string.h>

int main(void){
    char S[100];
    char T[100];
    int A,B;
    char U[100];

    scanf("%s", &S);
    scanf("%s", &T);
    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%s", &U);

    if(strcmp(S, U) == 0){
        puts(S - 1, T);
    }else if(strcmp(T, U) == 0){
        puts(S, T - 1);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: too many arguments to function 'int puts(const char*)'
   17 |         puts(S - 1, T);
      |         ~~~~^~~~~~~~~~
In file included from a.cc:1:
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
a.cc:19:13: error: too many arguments to function 'int puts(const char*)'
   19 |         puts(S, T - 1);
      |         ~~~~^~~~~~~~~~
/usr/include/stdio.h:714:12: note: declared here
  714 | extern int puts (const char *__s);
      |            ^~~~
Language: Java

#include<stdio.h>
#include<string.h>

int main(void){
    char S[100];
    char T[100];
    int A,B;
    char U[100];

    scanf("%s", &S);
    scanf("%s", &T);
    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%s", &U);

    if(strcmp(S, U) == 0){
        puts(S - 1, T);
    }else if(strcmp(T, U) == 0){
        puts(S, T - 1);
    }
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:2: error: illegal character: '#'
#include<string.h>
^
Main.java:6: error: class, interface, enum, or record expected
    char T[100];
    ^
Main.java:7: error: class, interface, enum, or record expected
    int A,B;
    ^
Main.java:8: error: class, interface, enum, or record expected
    char U[100];
    ^
Main.java:10: error: class, interface, enum, or record expected
    scanf("%s", &S);
    ^
Main.java:11: error: class, interface, enum, or record expected
    scanf("%s", &T);
    ^
Main.java:12: error: class, interface, enum, or record expected
    scanf("%d", &A);
    ^
Main.java:13: error: class, interface, enum, or record expected
    scanf("%d", &B);
    ^
Main.java:14: error: class, interface, enum, or record expected
    scanf("%s", &U);
    ^
Main.java:16: error: class, interface, enum, or record expected
    if(strcmp(S, U) == 0){
    ^
Main.java:18: error: class, interface, enum, or record expected
    }else if(strcmp(T, U) == 0){
    ^
Main.java:20: error: class, interface, enum, or record expected
    }
    ^
Main.java:22: error: class, interface, enum, or record expected
}
^
15 errors