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

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char s[11];int i,k=1;
    scanf("%s",s);
    if(s[0]!='A') k=0;
    if(s[2]!='C') k=0;
    for(i=1;i<strlen(s);i++)
    {
        if(i!=2)
        {
            if(s[i]<97||s[i]>123) k=0;
        }
    }
    if(k==1)
    printf("AC\n");
    else printf("WR\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'strlen' was not declared in this scope
   10 |     for(i=1;i<strlen(s);i++)
      |               ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <stdio.h>
#include <string.h>
int main(void)
{
	char s[11];
	int n,i,z=0,y=0;
	scanf("%s",s);
	n=strlen(s);
	for(i=2; i<n-1; i++){
		if(s[i]=='C'){
			z=z+1;
		}
		if('a'<=s[i] && s[i]<='z'){
			y=y+1;
		}
	}
	if(z==1 && y==(n-4) && s[0]='A'){
		printf("AC\n");
	}else{
		printf("WA\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: lvalue required as left operand of assignment
   17 |         if(z==1 && y==(n-4) && s[0]='A'){
      |            ~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {

#ifdef LOCAL_DEFINE
	FILE* fp;
	freopen("input.txt", "rt", stdin);
#endif

	string s;
	cin >> s;

	if (s[0] != 'A') {
		cout << "WA" << endl;
		return 0;
	}

	bool flag = false;
	int cnt = 0, pos;

	for (int i = 2; i < s.size() - 1; i++) {
		if (s[i] == 'C') {
			if (cnt == 0) {
				flag = true;
				cnt++;
				pos = i;
			}
			else flag = false;
		}
	}

	if (!flag) {
		cout << "WA" << endl;
		return 0;
	}

	flag = true;

	string alph = "abcdefghijklmnopqrstuvwxyz";

	for (int i = 1; i < s.size(); i++) {
		if (i != pos) {
			if (slph.find(s[i]) == string::npos) {
				flag = false;
				break;
			}
		}
	}

	if (!flag) cout << "WA" << endl;
	else cout << "AC" << endl;

#ifdef LOCAL_DEFINE
	cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:29: error: 'slph' was not declared in this scope; did you mean 'alph'?
   47 |                         if (slph.find(s[i]) == string::npos) {
      |                             ^~~~
      |                             alph
Language: C++

/******************
*  Writer: Oh no  *
******************/
#include<algorithm>
#include<cstdio>
#include<iostream>
#include<cstring>
#include<cmath>
#include<map>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<string>
#include<vector>
using namespace std;
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s;
	cin>>s;
	if(s[0]!='A'){
		cout<<"WA";
		return 0;
	}
	s.erase(0,1);
	if(s[0]<'a'||s[0]>'z'){
		cout<<"WA";
		return 0;
	}
	s.erase(0,1);
	if(s[s.size()-1]<'a'||s[s.size()-1]>'z'){
		cout<<"WA";
		return 0;
	}
	s.erase(s.size()-1,1);
	int cnt;
	for(int i=0;i<s.size();i++){
		if(s[i]=='C'){
			cnt++;
		}else{
			if(s[]<'a'||s[i]>'z'){
				cout<<"WA";
				return 0;
			}
		}
	}
	if(cnt==1){
		cout<<"AC";
	}else{
		cout<<"WA";
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:30: error: expected primary-expression before ']' token
   43 |                         if(s[]<'a'||s[i]>'z'){
      |                              ^
Language: C++

#include <stdio.h>
#include <string.h>
int main(void)
{
	char s[11];
	int n,i,z=0,y=0;
	scanf("%s",s);
	n=strlen(s);
	for(i=2; i<n-1; i++){
		if(s[i]=='C'){
			z=z+1;
		}
		if('a'<=s[i] && s[i]<='z'){
			y=y+1;
		}
	}
	if(z==1 && y==n-4 && s[0]='A'){
		printf("AC\n");
	}else{
		printf("WA\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: lvalue required as left operand of assignment
   17 |         if(z==1 && y==n-4 && s[0]='A'){
      |            ~~~~~~~~~~~~~~~^~~~~~~
Language: C

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

int main(void){
  int i;
  char s[11];
  prinf("%s", s);
  if ( !islower(s[1]) ) {
    printf("WA\n");
    return 0;
  }
  if ( s[2] != 'C' ) {
    printf("WA\n");
    return 0;
  }
  for ( i = 3, i < strlen(s); i++ ) {
    if ( !islower(s[i]) ) {
      printf("WA\n");
      return 0;
    }
  }
  printf("AC");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |   prinf("%s", s);
      |   ^~~~~
      |   printf
main.c:8:9: error: implicit declaration of function 'islower' [-Wimplicit-function-declaration]
    8 |   if ( !islower(s[1]) ) {
      |         ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'islower'
    2 | #include<string.h>
  +++ |+#include <ctype.h>
    3 | 
main.c:16:34: error: expected ';' before ')' token
   16 |   for ( i = 3, i < strlen(s); i++ ) {
      |                                  ^~
      |                                  ;
Language: C++

#include<iostream>
#include<cctype>
using namespace std;
int main()
{
	char a[1005];
	cin>>a;
	int count1=0;
	for(int i=0;i<strlen(a);i++)
	if(isupper(a[i]))count1++;
	if(a[0]=='A'&&a[2]=='C'&&count1==2)
	cout<<"AC";
	else cout<<"WA";
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'strlen' was not declared in this scope
    9 |         for(int i=0;i<strlen(a);i++)
      |                       ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<cctype>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>

using namespace std;

int main()
{   string n;
    int ans=0; 
    cin>>n;
    if(n[0]!='A')
    {
	  cout<<"WA";
	  return 0;
	}
	if(n[1]<'a' || n[i]>'z')
	{
	  cout<<"WA";
	  return 0;
	}
	for(int i=2;i<n.size();i++)
	{
	  if(n[i]=='C'&& i!=n.size()-1)
	  {
	    ans++;
	    if(ans>1)
	    {
		  cout<<"WA";
		  return 0;
		}
	  }
	  else if(n[i]>='a' && n[i]<='z')
	     continue;
      else 
      {
	    cout<<"WA";
	    return 0;
	  }
	}
	cout<<"AC";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: 'i' was not declared in this scope
   18 |         if(n[1]<'a' || n[i]>'z')
      |                          ^
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for(i=0;i<(int)n;++i)

typedef long long ll;

int main(int argc, char const *argv[]) {
    char S[12];
    int len=strlen(S);
    int c=0,flag=0;
    if(S[0]!='A'){
        printf("WA");
        return 0;
    }
    for(int i=2;i<len-1;i++){
        if(S[i]=='C'){
            count++;
            flag=i;
        }
    }
    if(count!=1){
        printf("WA");
        return 0;
    }
    for(int i=1;i<len;i++){
        if((S[i]<'a' || S[i]>'z')&&i!=flag){
            printf("WA");
            return 0;
        }
    }
    printf("AC");
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:17:13: error: 'count' was not declared in this scope; did you mean 'std::count'?
   17 |             count++;
      |             ^~~~~
      |             std::count
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
a.cc:21:8: error: 'count' was not declared in this scope; did you mean 'std::count'?
   21 |     if(count!=1){
      |        ^~~~~
      |        std::count
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: 'std::count' declared here
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] a = s.toCharArray();

        int flag == 0;
        if(a[0] != 'A'){
            flag++;
        }
        int flag2 = 0;
        for(int i = 1;i<a.length;i++){
            if(Character.isUpperCase(a[i]);){
                flag2++;
            }
        }
        if(s.indexOf("C") != s.lastIndexOf("C")){
            flag++;
        }

        if(flag == 0 && flag2 == 1){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
}

Compiler output:
Main.java:9: error: ';' expected
        int flag == 0;
                ^
Main.java:15: error: ')' expected
            if(Character.isUpperCase(a[i]);){
                                          ^
Main.java:15: error: illegal start of expression
            if(Character.isUpperCase(a[i]);){
                                           ^
3 errors
Language: C++

#include<iostream>
#include<cctype>
using namespace std;
int main()
{
	char a[105];
	cin>>a;
	int count1=0;
	for(int i=0;i<strlen(a);i++)
	if(isupper(a[i]))count1++;
	if(a[0]=='A'&&a[2]=='C'&&count1==2)
	cout<<"AC";
	else cout<<"WA";
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'strlen' was not declared in this scope
    9 |         for(int i=0;i<strlen(a);i++)
      |                       ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<cctype>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <string>
#include <cstdlib>
#include <climits>
#include <cmath>

using namespace std;

int main(void){
	string s;
	cin >> s;

	bool first_a = false;
	if(s.at(0)=='A'){
		first_a = true;
	}
	int l = s.length();
	int C_counter = 0;
	for(int i=s.at(2);i<s.at(l-2);i++){
		if(s.at(i) == 'C'){
			count++;
		}
	}
	bool wa = false;
	if(cout = 1){
		wa = true;
	}
	if(!(first_a)){
		wa = true;
	}
	if(s.islower(1)){
		wa = true;
	}else{
		if(s.islower(l)){
			wa = true;
		}
		for(int i=3;i<=l-2;i++){
			if(s.islower(i)){
				wa = true;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:30: error: no post-increment operator for type
   24 |                         count++;
      |                              ^~
a.cc:28:19: error: no match for 'operator=' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
   28 |         if(cout = 1){
      |                   ^
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:458:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
  458 |       operator=(basic_ostream&& __rhs)
      |       ^~~~~~~~
/usr/include/c++/14/ostream:458:33: note:   no known conversion for argument 1 from 'int' to 'std::basic_ostream<char>&&'
  458 |       operator=(basic_ostream&& __rhs)
      |                 ~~~~~~~~~~~~~~~~^~~~~
a.cc:34:14: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'islower'
   34 |         if(s.islower(1)){
      |              ^~~~~~~
a.cc:37:22: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'islower'
   37 |                 if(s.islower(l)){
      |                      ^~~~~~~
a.cc:41:30: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'islower'
   41 |                         if(s.islower(i)){
      |                              ^~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s ;
    cin>>s ;
    int x = 0 ;
    x += (s[2] == 'C');
    x += (s[s.size()-2] == 'C') ;
    x -= (2 == s.size() - 2)
    if(x == 1 && s[0] == 'A')
    {
       int cnt = 0 ;
       for(int i = 0 ; i < s.size() ; ++i)
       {
           if(s[i] >= 'A' && s[i] <= 'Z')
            cnt++;
       }
       if(cnt == 2)
        cout<<"AC";
       else
        cout<<"WA";
    }
    else
        cout<<"WA";
    return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: expected ';' before 'if'
   12 |     x -= (2 == s.size() - 2)
      |                             ^
      |                             ;
   13 |     if(x == 1 && s[0] == 'A')
      |     ~~                       
a.cc:26:5: error: 'else' without a previous 'if'
   26 |     else
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T> using vt = vector<T>;
template<class T> using vvt = vector<vt<T>>;
template<class T> using ttt = tuple<T,T>;
using tii = tuple<int,int>;
using vi = vector<int>;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define mt make_tuple
#define ALL(a) (a).begin(),(a).end()
#define FST first
#define SEC second
#define DEB cerr<<"!"<<endl
#define SHOW(a,b) cerr<<(a)<<" "<<(b)<<endl
#define DIV int(1e9+7)
const int INF = (INT_MAX/2);
const ll LLINF = (LLONG_MAX/2);
const double eps = 1e-8;
//const double PI = M_PI;  
inline ll pow(ll x,ll n,ll m){ll r=1;while(n>0){if((n&1)==1)r=r*x%m;x=x*x%m;n>>=1;}return r%m;}
inline ll lcm(ll d1, ll d2){return d1 / __gcd(d1, d2) * d2;}

/*Coding Space*/
int main(){
  string s; cin >> s;
  bool flag = 0;
  rep(i,s.size()){
    if(s[i] >= 'A' && s[i] <= 'Z'){
      if(i == 0 && s[0] == 'A') continue;
      if(i >= 2 && i != (int)s.size()-1 && s[i] == 'C' && !flag) {flag = 1; continue;}
      cout << "WA" << endl;
      return 0;
    }
  }
  if(a[0] == 'A' && flag)
    cout << "AC" << endl;
  else
    cout << "WA" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:6: error: 'a' was not declared in this scope
   37 |   if(a[0] == 'A' && flag)
      |      ^
Language: C++

#include "bits/stdc++.h"

using namespace std;

int main() {
    string S;
    cin >> S;
    bool ok = S[0] == 'A';
    int cnt = 0;
    for (int i = 1; i < S.size(); i++) {
        if (i < 2 || i + 1 == S.size()) ok &= islower(S[i]);
        else if (S[i] == 'C') cnt++;
        else ok &= ok &= islower(S[i]);
    }
    ok &= cnt == 1;
    cout << (ok ? "AC" : "WA") << endl;t
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:40: error: 't' was not declared in this scope
   16 |     cout << (ok ? "AC" : "WA") << endl;t
      |                                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long l;
int main(){
    string a;
    cin>>s;
    int x=0,y=1;
    if(s[0]=='A'){
        for(int i=2;i<s.size()-1;i++){
            if(s[i]=='C') x++;
            if(s[i]>90) y--;
        }
    }
    if(x==1&&y) cout<<"AC"<<endl;
    else cout<<"WA"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's' was not declared in this scope
    6 |     cin>>s;
      |          ^
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<list>
#include<queue>
#include<functional>
#include<limits.h>
#include<string.h>
using namespace std;

signed main() {
	string a; cin >> a;
	if (a[0] == 'A') {
		for (int i = 2; i < a.length() - 1; i++) {
			if (a[i] == 'C')break;
			if (i == a.length() - 2)goto l;
		}
		sort(a.begin(), a.end());
		if (a[2] >= 'a') { puts("AC"); return 0; }
	l:;
	}
	puts("WA");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |                 sort(a.begin(), a.end());
      |                 ^~~~
      |                 short
Language: Java

void solve (FastScanner in, PrintWriter out) {
	
	//入力
	int n = in.nextInt(), goal = in.nextInt();
	Problem[] p = new Problem[n];
	for (int i=0; i<n; i++) {
		p[i] = new Problem(in.nextLong(), (i+1)*100, in.nextLong());
	}
	
	//ビット全探索+@
	long min = Long.MAX_VALUE;
	for (int i=0; i<(1<<n); i++) {

		int num = 0; //その組み合わせでは何問解いたか？
		long sum = 0L; //その組み合わせで得られたスコアの合計
		
		//全完していない問題のうち、最もスコアが高いもの、すなわち
		//i をビット表現したときに最も右側にある 0 の位置を記録する変数
		int rightMost = -1; 

		for (int j=n-1; j>=0; j--) { //
			if ((1&i>>j) == 1) {
				sum += p[j].num * p[j].score + p[j].bonus;
				num += p[j].num;
			}
			else if ((1&i>>j) == 0 && rightMost == -1) {
				rightMost = j;
			}
		}
		
		//sum が目標スコア以上の場合は、解いた問題の数をそのまま min に記録する
		if (sum >= goal) {
			min = Math.min(min, num);
			continue;
		}
		else if (rightMost != -1){
			//そうでない場合かつ、全完していない問題が少なくとも1つある場合
			
			//目標スコアに届くまで、スコアが最も多い問題を needNum 回解く必要がある
			long needNum = (goal-sum+p[rightMost].score-1) / p[rightMost].score;
			
			if (needNum > p[rightMost].num) {
				//スコアが最も多い問題が needNum 問より少ないなら、放棄
				continue;
			}
			else {
				//そうでないなら、スコアが最も多い問題を needNum 問解き、
				//min を更新する
				min = Math.min(min, num + needNum);
			}
		}
		
	}

	out.println(min);

}

static class Problem {
	long num, score, bonus;
	Problem (long a, long b, long c) {
		num = a; score = b; bonus = c;
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
void solve (FastScanner in, PrintWriter out) {
^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (int i = 0; i < (int)c; i++)
using ll = long long;
int main() {
    int d;
    ll g;
    scanf("%d %lld", &d, &g);

    vector<ll> p(d), c(d);
    rep(i, d) scanf("%lld%lld", &p[i], &c[i]);

    ll res = inf;

    // 全完するかしないかの2とおりをd乗（問題数分）繰り返す
    for (int bit = 0; bit < (1 << d); ++bit) {
        ll point = 0;
        ll num = 0;
        rep(i, d) {

            // 1が立ってれば（その問題を全完する場合）
            if (bit & (1 << i)) {

                // 合計ポイント加算
                point += c[i] + p[i] * 100 * (i + 1);
                // 問題を解いた数。全完した場合なので++ではなくp[i]
                num += p[i];
            }
        }

        // 全完だけで目標をクリアした場合、一番少ない特典を取得
        if (point >= g) {
            res = min(res, num);
        }

        // 全完だけではクリアできなかった場合
        else {
            for (int i = d - 1; i >= 0; --i) {

                // その問題を全完してる場合次のループ
                if (bit & (1 << i)) continue;

                // 全完してなかったら目標を超えるまで、その問題がある限り、その問題を解く
                for (int j = 0; j < p[i]; ++j) {
                    if (point >= g) break;
                    point += 100 * (i + 1);
                    ++num;
                }
            }

            res = min(res, num);
        }
    }
    
    printf("%lld", res);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   13 |     ll res = inf;
      |              ^~~
      |              ynf
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

/*
再帰関数での全探索
bit全探索(2^n通り)
*/

void many_equals();

void train_ticket();

void all_green();

int main()
{
  //many_equals();
  //train_ticket();
  all_green();

}


void many_equals()
{
  string S;
  cin >> S;
  vector<int> a(S.size());

  for (int i = 0; i < S.size(); ++i)
  {
    a[i] = S[i] - '0';
  }

  cout << (1 << (S.size() - 1)) << "\n";;

  long long int n_sum = 0;
  for (int i = 0; i < 1 << (S.size() - 1); ++i)
  {
    //cout << i << "\n";
    long long int tmp = a[0];
    for (int p = 0; p < S.size() - 1; ++p)
    {
      //p left shift先にあれば
      if (i & 1 << p)
      {
        n_sum += tmp;
        tmp = a[p + 1];
      }
      else
      {
        tmp = tmp * 10 + a[p + 1];
      }
    }
    n_sum += tmp;
  }

  cout << n_sum << "\n";
}

void train_ticket()
{
  string abcd;
  cin >> abcd;
  vector<int> a(abcd.size());
  for (int i = 0; i < abcd.size(); ++i)
  {
    a[i] = abcd[i] - '0';
  }

  vector<char> sign(3);

  for (int i = 0; i < 1 << (abcd.size() - 1); ++i)
  {
    int v_sum = a[0];
    for (int j = 0; j < abcd.size() - 1; ++j)
    {
      if (i & 1 << j)
      {
        v_sum += a[j + 1];
        sign[j] = '+';
      }
      else
      {
        v_sum -= a[j + 1];
        sign[j] = '-';
      }
    }
    //iの位置は+,それ以外は-を行う判定
    if (v_sum == 7)
    {
      for (int k = 0; k < 3; ++k)
      {
        cout << abcd[k] << sign[k];
      }
      cout << abcd[3] << "=7\n";

      return;
    }
  }
}

void all_green()
{
  int D, G;
  cin >> D >> G;
  vector<pair<int, int>> p_c(D);
  for (int i = 0; i < p_c.size(); ++i)
  {
    cin >> p_c[i].first >> p_c[i].second;
  }

  int ans = INT_MAX;
  for (int bit = 0; bit < (1 << p_c.size()); ++bit)
  {
    int s = 0, cnt = 0, rest_max = -1;
    for (int i = 0; i < p_c.size(); ++i)
    {
      if (bit & 1 << i)
      {
        s += 100 * (i + 1) * p_c[i].first + p_c[i].second;
        cnt += p_c[i].first;
      }
      else
      {
        rest_max = i;
      }
    }

    if (s < G)
    {
      int s1 = 100 * (rest_max + 1);
      int need = (G - s) / s1;
      if (need >= p_c[rest_max].first) continue;
      cnt += need;
    }
    ans = min(ans, cnt);
  }
  cout << ans << "\n";
}

Compiler output:
a.cc: In function 'void all_green()':
a.cc:116:13: error: 'INT_MAX' was not declared in this scope
  116 |   int ans = INT_MAX;
      |             ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 |
Language: C++

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

int main(){
    int d,g;
    cin >> d >> g;
    int p[d], c[d];
    for (int i=0;i<d;i++){
        cin >> p[i] >> c[i];
    }
    int ans = 1e9;
    for (int mask = 0; mask<(1<<d); ++mask){  //1をDビット左シフト=2**dだけ値をかける(全探索)
        int s = 0, num = 0, rest_max = -1;
        for (int i = 0; i < d; ++i){
            if (mask >> i & 1){ //もしmaskのi桁目が1だったら=もしiを全部解くとしたら
                s += 100 * (i+1) * p[i] + c[i]; //得点
                num += p[i] //解いた数
            }else{
                rest_max = i;
            }
        }
        //もし目標得点に届いていなかったら
        if (s < g){
            int s1 = 100 * (rest_max + 1); //s1は一つの問題の得点
            int need = (g - s + s1 - 1) / s1;
            if (need >= p[rest_max]){
                continue; //無視
            }
            num += need;
        }
        ans = min(ans,num);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: expected ';' before '}' token
   17 |                 num += p[i] //解いた数
      |                            ^
      |                            ;
   18 |             }else{
      |             ~
Language: C++

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

//read_code(drken)
int main() {
    int d;cin>>d;
    ll g;cin>>g;
    vector<ll>p,c;
    p.resize(d); c.resize(d);
    rep(i,d)cin>>p[i]>>c[i];

    ll ans = 1e+15;
    rep(bit,1<<d){
        ll sum=0;
        ll cc =0;
        rep(i,d)if(bit & (1<<i)){
            sum+=c[i]+p[i]*100*(i+1);
            cc +=p[i];
        }
            if(sum>=g)ans = min(ans,cc);
            else{
                for(int i = d-1;i>=0;--j){
                    if(bit & (1<<i))continue;
                    rep(j,p[i]){
                        if(sum>=g)break;
                        sum+=100*(i+1);
                        ++cc;
                    }
                }
            }
            ans=min(ans,cc);
        }
    cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:40: error: 'j' was not declared in this scope
   24 |                 for(int i = d-1;i>=0;--j){
      |                                        ^
Language: C++

#include <bits/stdc++.h>
#define MAX_N 10000
#define INF 1e9

using namespace std;

typedef int long long ll;
typedef int long l;
typedef pair<int, int> Pii;
const ll MOD = 1000000007;

int p[10];
int c[10];
int d, g;

int solve(int x) {
    if (x >= (1 << d)) {
        return int(INF);
    }

    int ans = 0;
    int cnt = 0;

    for (int i = 0; i < d; i++) {
        if (((x >> i) & 1) == 1) {
            ans += p[i] * 100 * (i + 1);
            ans += c[i];
            cnt += p[i];
        }
    }

    if (ans < g)
        return min(int(INF), solve(x + 1));
    if (ans == g)
        return min(cnt, solve(x + 1));

    int acnt = cnt;
    for (int i = 0; i < d; i++) {
        if ((x >> i) & 1) {
            int tmpp = p[i];
            int tmpc = cnt;
            int tans = ans;
            tans -= c[i];
            tans -= (i + 1) * 100;
            tmpc--;
            tmpp--;
            while (tmpp >= 1) {
                if (tans = < g) {
                    acnt = min(acnt, tmpc + 1);
                    break;
                }
                tmpp--;
                tmpc--;
                tans -= (i + 1) * 100;
            }
        }
    }
    return min(acnt, solve(x + 1));
}
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> d >> g;
    for (int i = 0; i < d; i++) {
        cin >> p[i] >> c[i];
    }
    cout << solve(1) << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int solve(int)':
a.cc:48:28: error: expected primary-expression before '<' token
   48 |                 if (tans = < g) {
      |                            ^
Language: C++

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

int main(){
  int D;
  int G;
  cin >> D >> G;
  vector<int> p(D);
  vector<int> c(D);
  
  int answer_count = 0;
  
  for(int i=0;i<D;i++){
    cin >> p.at(i) >> c.at(i);
    answer_count += p.at(i);
  }
  
  
  for(int bit=0;bit<(1<<D);bit++){
    bitset<D> s(bit);
    int sum = 0;
    int count = 0;
    for(int i=0;i<D;i++){
      if((bit>>i)&1){
        for(int j=0;j<p.at(i);j++){
          sum+=100*(i+1);
          count++;
          if(j+1==p.at(i)) sum += c.at(i);
          if(sum>=G||count<=answer_count){
              answer_count = count;
              break;
          }
        }    
      }
    }
  }
  
  cout << answer_count << endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: the value of 'D' is not usable in a constant expression
   20 |     bitset<D> s(bit);
      |             ^
a.cc:5:7: note: 'int D' is not const
    5 |   int D;
      |       ^
a.cc:20:13: note: in template argument for type 'long unsigned int'
   20 |     bitset<D> s(bit);
      |             ^
Language: C++

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

int main(){
  int D;
  int G;
  cin >> D >> G;
  vector<int> p(D);
  vector<int> c(D);
  
  int answer_count = 0;
  
  for(int i=0;i<D;i++){
    cin >> p.at(i) >> c.at(i);
    answer_count += p.at(i);
  }
  
  
  for(int bit=0;bit<(1<<D);bit++){
    bitset<10> s(bit);
    int sum = 0;
    int count = 0;
    for(int i=0;i<D;i++){
      if((bit>>i)&1){
        for(int j=0;j<p.at(i);j++){
          sum+=100*(i+1);
          count++;
          if(j+1==p.at(i)) answer += c.at(i);
          if(sum>=G||count<=answer_count){
              answer_count = count;
              break;
          }
        }    
      }
    }
  }
  
  cout << answer_count << endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:28: error: 'answer' was not declared in this scope
   28 |           if(j+1==p.at(i)) answer += c.at(i);
      |                            ^~~~~~
Language: C++

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

int main(){
  int D;
  int G;
  cin >> D >> G;
  vector<int> p(D);
  vector<int> c(D);
  
  int answer_count = 0;
  
  for(int i=0;i<D;i++){
    cin >> p.at(i) >> c.at(i);
    answer_count += p.at(i);
  }
  
  
  for(int bit=0;bit<(1<<D);bit++){
    bitset<D> s(bit);
    int sum = 0;
    int count = 0;
    for(int i=0;i<D;i++){
      if((bit>>i)&1){
        for(int j=0;j<p.at(i);j++){
          sum+=100*(i+1);
          count++;
          if(j+1==p.at(i)) answer += c.at(i);
          if(sum>=G||count<=answer_count){
              answer_count = count;
              break;
          }
        }    
      }
    }
  }
  
  cout << answer_count << endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: the value of 'D' is not usable in a constant expression
   20 |     bitset<D> s(bit);
      |             ^
a.cc:5:7: note: 'int D' is not const
    5 |   int D;
      |       ^
a.cc:20:13: note: in template argument for type 'long unsigned int'
   20 |     bitset<D> s(bit);
      |             ^
a.cc:28:28: error: 'answer' was not declared in this scope
   28 |           if(j+1==p.at(i)) answer += c.at(i);
      |                            ^~~~~~
Language: C++

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

int main(){
  int D,G;
  cin >> D >> G;
  vector<int> p(D);
  vector<int> c(D);
  
  int answer_count = 0;
  
  for(int i=0;i<D;i++){
    cin >> p.at(i) >> c.at(i);
    answer_count += p.at(i);
  }
  
  
  for(int bit=0;bit<(1<<D);bit++){
    bitset<D> s(bit);
    int sum = 0;
    int count = 0;
    for(int i=0;i<D;i++){
      if((bit>>i)&1){
        for(int j=0;j<p.at(i);j++){
          sum+=100*(i+1);
          count++;
          if(j+1==p.at(i)) answer += c.at(i);
          if(sum>=G||count<=answer_count){
              answer_count = count;
              break;
          }
        }    
      }
    }
  }
  
  cout << answer_count << endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: the value of 'D' is not usable in a constant expression
   19 |     bitset<D> s(bit);
      |             ^
a.cc:5:7: note: 'int D' is not const
    5 |   int D,G;
      |       ^
a.cc:19:13: note: in template argument for type 'long unsigned int'
   19 |     bitset<D> s(bit);
      |             ^
a.cc:27:28: error: 'answer' was not declared in this scope
   27 |           if(j+1==p.at(i)) answer += c.at(i);
      |                            ^~~~~~
Language: C++

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

int main(){
  int D,G;
  cin >> D >> G;
  vector<int> p(D);
  vector<int> c(D);
  
  int answer_count = 0;
  
  for(int i=0;i<D;i++){
    cin >> p(i) >> c(i);
    answer_count += p(i);
  }
  
  
  for(int bit=0;bit<(1<<D);bit++){
    bitset<D> s(bit);
    int sum = 0;
    int count = 0;
    for(int i=0;i<D;i++){
      if((bit>>i)&1){
        for(int j=0;j<p(i);j++){
          sum+=100*(i+1);
          count++;
          if(j+1==p(i)) answer += c(i);
          if(sum>=G||count<=answer_count){
              answer_count = count;
              break;
          }
        }    
      }
    }
  }
  
  cout << answer_count << endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: no match for call to '(std::vector<int>) (int&)'
   13 |     cin >> p(i) >> c(i);
      |            ~^~~
a.cc:13:21: error: no match for call to '(std::vector<int>) (int&)'
   13 |     cin >> p(i) >> c(i);
      |                    ~^~~
a.cc:14:22: error: no match for call to '(std::vector<int>) (int&)'
   14 |     answer_count += p(i);
      |                     ~^~~
a.cc:19:13: error: the value of 'D' is not usable in a constant expression
   19 |     bitset<D> s(bit);
      |             ^
a.cc:5:7: note: 'int D' is not const
    5 |   int D,G;
      |       ^
a.cc:19:13: note: in template argument for type 'long unsigned int'
   19 |     bitset<D> s(bit);
      |             ^
a.cc:24:24: error: no match for call to '(std::vector<int>) (int&)'
   24 |         for(int j=0;j<p(i);j++){
      |                       ~^~~
a.cc:27:20: error: no match for call to '(std::vector<int>) (int&)'
   27 |           if(j+1==p(i)) answer += c(i);
      |                   ~^~~
a.cc:27:25: error: 'answer' was not declared in this scope
   27 |           if(j+1==p(i)) answer += c(i);
      |                         ^~~~~~
a.cc:27:36: error: no match for call to '(std::vector<int>) (int&)'
   27 |           if(j+1==p(i)) answer += c(i);
      |                                   ~^~~
Language: C++

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

int main(){
    int d,g;
    cin >> d >> g;
    pair<int,int> p[d];
    int ans=1e9;
    int MAX;
    int sum;
    for(int i=0;i<d;i++){
        cin >> p[i].first >> p[i].second;
        p[i].second=(i+1)*100*p[i].first+p[i].second;
    }
    for(int i=0;i<(1 << d);i++){
        MAX=0;
        sum=0;
        tmp=0;
        for(int j=0;j<d;j++){
            if(i & (1 << j)){
                sum+=p[j].second;
                tmp+=p[i].first;
            }
            else MAX=j;
        }
        if(sum>=g)ans=min(ans,tmp);
        else{
            if((g-sum)/((MAX+1)*100)<=p[MAX].first)ans=min(ans,tmp+(g-sum+(MAX+1)*100-1)/((MAX+1)*100));
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   18 |         tmp=0;
      |         ^~~
      |         tm
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
ll n,g;
cin >> n >> g;
vector<ll> nums(n),extra(n);
for(ll i = 0; i < n; i++){
    cin >> nums[i] >> extra[i];
}
ll ans = 100000000;
for(ll bit = 0; bit < (1 << n); bit++) {
    ll sum = 0;
    ll howmany = 0;
    vector<ll> tmp;
    set<ll> st;
    for (ll i = 0; i < n; i++) {
        if (bit & (1 << i)) {
            tmp.emplace_back(i);
            st.insert(i);
        }
    }
        for (ll i = 0; i < tmp.size(); i++) {
            sum += (tmp[i] + 1) * 100 * nums[tmp[i]];
            sum += extra[tmp[i]];
            howmany += nums[tmp[i]];
        }
        if (sum >= g) {
            ans = min(ans, howmany);
        } else {
            sort(tmp.rbegin(), tmp.rend());
            ll need = 0;
            for (ll i = n - 1; i >= 0; i--) {
                if (!st.count(i)) {
                    need = i;
                    break;
                }
            }
        for(ll i = 1; i <= nums[need] - 1; i++){
            ans += (need + 1) * 100;
            howmany++;
            if(ans >= g)
                howmany = min(ans,howmany);
        }

        }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:2: error: expected '}' at end of input
   54 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

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

int main()
{
    int D,G;
    cin>>D>>G;
  
    int num[D];
    int bonus[D];

    for(int i=0;i<D;i++)
    {
       cin>>num[i]>>bonus[i];    
    }
  
    for(int bit=0;bit<(1<<10);bit++)
    {
        int sum =0;
        int hekaku=1000;
        int now=0;
        for(int i=0;i<D;i++)
        {
            if(bit&(1<<i))
            {
                sum +=num[i];
                now +=(i+1)*100+bonus[i];
            
            }
        }
       if(now >= G)
       {
         hekaku = min(sum,hekaku);
        
       }
      else
      {
          for(int k=D-1;k>=0;k--)
          {
              if(bit^(1<<k))
              {
                  for(int r=0;r<num[k];r++)
                  { 
                     now +=(k+1)*100;
                     sum++;
                     if(now>=G)
                     {
                       hekaku = min(sum,hekaku);
                     }
                  }
              }
          }
      
      }
    
    
    
    }

   cout<<hekaku<<endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:10: error: 'hekaku' was not declared in this scope
   60 |    cout<<hekaku<<endl;
      |          ^~~~~~
Language: C++

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

int main()
{
    int D,G;
    cin>>D>>G;
  
    int num[D];
    int bonus[D];

    for(int i=0;i<D;i++)
    {
       cin>>num[i]>>bonus[i];    
    }
  
    for(int bit=0;bit<(1<<10);bit++)
    {
        int sum =0;
        int hekaku=1000;
        int now=0;
        for(int i=0;i<D;i++)
        {
            if(bit&(1<<i))
            {
                sum +=num[i];
                now +=(i+1)*100+bonus[i];
            
            }
        }
       if(now >= G)
       {
         hekaku = min(sum,kekaku);
        
       }
      else
      {
          for(int k=D-1;k>=0;k--)
          {
              if(bit !& (1<<k))
              {
                  for(int r=0;r<num[k];r++)
                  { 
                     now +=(k+1)*100;
                     sum++;
                     if(now>=G)
                     {
                       hekaku = min(sum,kekaku);
                     }
                  }
              }
          }
      
      }
    
    
    
    }

   cout<<hekaku<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:27: error: 'kekaku' was not declared in this scope; did you mean 'hekaku'?
   33 |          hekaku = min(sum,kekaku);
      |                           ^~~~~~
      |                           hekaku
a.cc:40:21: error: expected ')' before '!' token
   40 |               if(bit !& (1<<k))
      |                 ~   ^~
      |                     )
a.cc:48:41: error: 'kekaku' was not declared in this scope; did you mean 'hekaku'?
   48 |                        hekaku = min(sum,kekaku);
      |                                         ^~~~~~
      |                                         hekaku
a.cc:60:10: error: 'hekaku' was not declared in this scope
   60 |    cout<<hekaku<<endl;
      |          ^~~~~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
using namespace std;

int main() {
  int  D, G,ans = 1000000000;
  cin >> D >> G;
  vector<int> p(D);
  vector<int> c(D);
  for(int i =0; i < D; i++){
    cin >> p.at(i);
    cin >> c.at(i);
  }
  
  
  for(int score =0; score < (1<<); score++){
    int sum =0, sub, maxim= -1;
    for(int i = 0; i < D; i++){
      if(score >> i&1){
        sum += 100 * (i+1) * p.at(i) + c.at(i);
        sub += p.at(i);
      }else{
        maxim = i;
      }
    }
    if(sum < G){
      int s1 = 100 * (maxim + 1);
            int need = (G - sum + s1 - 1) / s1;
            if(need >= p[maxim]){
              continue;
            }
      else{
      sub += need;
      }
      ans = min(ans,sub);
    }
    cout << ans << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:33: error: expected primary-expression before ')' token
   18 |   for(int score =0; score < (1<<); score++){
      |                                 ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C

#include<stdio.h>
#define rep(i,n) for(int i=0; i<n; ++i)

int min(int a,int b){
  int temp;
  if(a>b)return b;
  if(a<=b)return a;
}


int main(){

  int d,g;
  scanf("%d%d",&d,&g);

  int p[11];
  int c[11];

  rep(i,d){
    scanf("%d",p[i]);
    scanf("%d",c[i]);
  }

  int ans = 1000000000;
  for(int bit=0; bit < (1<<d) ; bit++){
    int sum = 0, num = 0, rest_max = -1;
    for(int i=0; i<d ; i++){
      if(bit >> i & 1){
        sum += 100 * (i+1) * p[i] + c[i];
        num += p[i];
      }else{
        rest_max = i;
      }
    }
    if(sum < g){
      int s1 = 100*(rest_max+1);
      int need = (g - sum - s1 -1) / s1;
      if(need >= p[rest_max]){
        continue;
      }
      num += need;
    }
    ans = min(ans,num);
    printf("%d",ans);


  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:48:1: error: expected declaration or statement at end of input
   48 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define pii pair<int,int>
const long long MOD=1e9+7;




int main() {
  int d,g;
  cin>>d>>g;
  pii P[10];
  rep(i,d) cin>>P[i].second>>P[i].first;
  int ans=1001;
  for(int bit=0,bit<(1<<d);++bit){
    int sum=0;
    vector<int> ac(d,0);
    for(int i=0;i<n;++i){// AllAC
      if(bit&(1<<i)){
        sum+=(i+1)*100P[i].first+P[i].second;
        ac[i]+=P[i].first;
      }
    }
    while(sum<g){
      for(int i=d-1,i>=0;--i){
        if(ac[i]<P[i].first){
          sum+=i*100;
          ac[i]++;
          break;
        }
      }
    }
    
      
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before '<' token
   17 |   for(int bit=0,bit<(1<<d);++bit){
      |                    ^
      |                    ;
a.cc:17:20: error: expected primary-expression before '<' token
a.cc:20:19: error: 'n' was not declared in this scope
   20 |     for(int i=0;i<n;++i){// AllAC
      |                   ^
a.cc:22:20: error: unable to find numeric literal operator 'operator""P'
   22 |         sum+=(i+1)*100P[i].first+P[i].second;
      |                    ^~~~
a.cc:27:22: error: expected ';' before '>=' token
   27 |       for(int i=d-1,i>=0;--i){
      |                      ^~
      |                      ;
a.cc:27:22: error: expected primary-expression before '>=' token
   27 |       for(int i=d-1,i>=0;--i){
      |                      ^~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:11:12: note: to match this '{'
   11 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int vsum(vector<int> v){
  int a=0;
  for(int i=0;i<v.size();i++)a+=v[i];
  return a;
}
int main(){
  int i,j,tmp,D,G,ans=0;
  cin>>D>>G;
  vector<int> p(N),c(N);
  for(i=0;i<N;i++)cin>>p[i]>>c[i];
  for(tmp=0;tmp<(1<<D);tmp++){
    bitset<10> s(tmp);
    int cnt=0,point=0;
    for(i=0;i<D;i++){
      if(s[i]){
        cnt+=p[i];
        point+=p[i]*(i+1)*100+c[i];
      }
    }
    if(point>=G)ans=min(ans,cnt);
    else {
      for(i=0;i<D;i++){
        if(!s[D-1-i]){
          for(j=0;j<p[D-1-i];j++){
            point+=(D-i)*100;
            cnt++;
            if(point>=G){ans=min(ans,cnt);break;}
          }
          break;
        }
      }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'N' was not declared in this scope
   11 |   vector<int> p(N),c(N);
      |                 ^
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

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

int main() {
  int D,G,i,ans=10000;
  cin>>D>>G;
  vector<int> p(D),c(D);
  for(i=0;i<D;i++)cin>>p[i]>>c[i];
  
  for(int tmp=0;tmp<(1<<D);tmp++){
    bitset<10> x(tmp);
    int scr=0,sum=0;
    
    for(i=0;i<D;i++){
      if(x.test(i)){
        scr+=100*(i+1)*p[i]+c[i];
        sum+=p[i];
      }
      if(sum>=ans||scr>=G)break;
    }
    
    if(scr<G&&sum<ans){
      for(i=D-1;i>=0;i--){
        if(!x.test(i)){
          if((scr+p[i]*100*)i>=G){
            sum+=(G-scr)/(100*(i+1));
            scr=G;
          }
          break;
        }
      }
    }
    
    if(scr>=G)ans=min(ans,sum);
    //cout<<sum<<","<<ans<<","<<scr<<endl;
  }
  
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:28: error: expected primary-expression before ')' token
   25 |           if((scr+p[i]*100*)i>=G){
      |                            ^
a.cc:25:29: error: expected ')' before 'i'
   25 |           if((scr+p[i]*100*)i>=G){
      |             ~               ^
      |                             )
Language: C++

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

int main() {
  int D,G,i,ans=10000;
  cin>>D>>G;
  vector<int> p(D),c(D);
  for(i=0;i<D;i++)cin>>p[i]>>c[i];
  for(int tmp=0;tmp<(1<<D);tmp++){
    bitset<10> x(tmp);
    int scr=0,sum=0;
    
    for(i=0;i<D;i++){
      if(x.test(i)){
        scr+=100*(i+1)*p[i]+c[i];
        sum+=p[i];
      }
      if(sum>=ans||scr>=G)break;
    }
    if(scr<G&&sum<ans){
      for(int j=D-1;j>=0;j--){
        if(!x.test(j)){
          if(scr+p[j]*100*(j+1)>=G){
            sum+=(G-scr)/(100*(j+1));
            scr=G;
          }
          break;
      　}
    　}
    }
    if(scr>=G)ans=min(ans,sum);
    cout<<sum<<","<<ans<<","<<scr<<endl;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc:28:7: error: extended character 　 is not valid in an identifier
   28 |       　}
      |       ^
a.cc:29:5: error: extended character 　 is not valid in an identifier
   29 |     　}
      |     ^
a.cc: In function 'int main()':
a.cc:28:7: error: '\U00003000' was not declared in this scope
   28 |       　}
      |       ^~
a.cc:29:5: error: '\U00003000' was not declared in this scope
   29 |     　}
      |     ^~
Language: C++

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

int main() {
  int D,G,i,ans=1000;
  cin>>D>>G;
  vector<int> p(D),c(D);
  for(i=0;i<D;i++)cin>>p[i]>>c[i];
  for(int tmp=0;tmp<(1<<(D+1));tmp++){
    bitset<10> x(tmp);
    int scr=0,sum=0;
    
    for(i=0;i<D;i++){
      if(x.test(i)){
        scr+=100*(i+1)*p[i]+c[i];
        sum+=p[i];
      }
      if(sum>=ans||scr>=G)break;
    }
    if(scr<G&&sum<zns){
    for(int j=D-1;j>=0;j--){
      if(!x.test(j)){
        if(scr+p[j]*100*(j+1)>=G){
          sum+=(G-scr)/(100*(j+1));
          scr=G;
        }
        break;
      }
    }
    }
    if(scr>=G)ans=min(ans,sum);
    //cout<<sum<<","<<ans<<","<<scr<<endl;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: 'zns' was not declared in this scope; did you mean 'ans'?
   20 |     if(scr<G&&sum<zns){
      |                   ^~~
      |                   ans
Language: C++

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

int main() {
  int d, g, p[11], c[11];
  cin >> d >> g;
  rep(i,d) cin >> p[i] >> c[i];
  
  int ans = 1e9;
  int sum = 0, num = 0, rest = 0;
  rep(bit,1<<d) {
    rep(i,d) {
      if (bit & (1 << i)) {
        sum += 100 * (i+1) * p[i] + c[i];
        num += p[i];
      }
      else rest = i;
    }
  
    if (sum < g) {
      int tmp = 100 * (rest+1);
      int need;
      if ((g-sum) % tmp == 0) need = (g-sum) / tmp;
      else need = ((g-sum) / tmp) + 1;
      if (need >= p[rest]) continue;
      num += need;
    }
    
    ans = min(ans, num);
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'll'
    4 | using ll long long;
      |       ^~
Language: C++

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

int main() {
  int d, g, p[11], c[11];
  cin >> d >> g;
  rep(i,d) cin >> p[i] >> c[i];
  
  int ans = 1e9;
  int sum = 0, num = 0, rest = 0;
  rep(bit,1<<d) {
    rep(i,d) {
      if (bit & (1 << i)) {
        sum += 100 * (i+1) * p[i] + c[i];
        num += p[i];
      }
      else rest = i;
    }
  }
  
  if (sum < g) {
    int tmp = 100 * (rest+1);
    int need;
    if ((g-s) % tmp == 0) need = (g-s) / tmp;
    else need = ((g-s) / tmp) + 1;
    if (need >= p[rest]) continue;
    num += need;
    ans = min(ans, num);
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'll'
    4 | using ll long long;
      |       ^~
a.cc: In function 'int main()':
a.cc:26:12: error: 's' was not declared in this scope
   26 |     if ((g-s) % tmp == 0) need = (g-s) / tmp;
      |            ^
a.cc:28:26: error: continue statement not within a loop
   28 |     if (need >= p[rest]) continue;
      |                          ^~~~~~~~
Language: C++

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

int main () {
  int d, g, p[10], c[10];
  cin >> d >> g;
  rep(i,n) cin >> p[i] >> c[i];

  int ans = 1e9;
  rep(mask,1<<d) {
    int s = 0, num = 0, rest_max = -1;
    rep(i,d) {
      if (mask & 1 << i) {
        s += 100 * (i+1) * p[i] + c[i];
        num += p[i];
      }
      else rest_max = i;
    }
    
    if (s < g) {
      int s1 = 100 * (rest_max + 1);
      int need = (g - s) / s1 + 1;
      if (need >= p[rest_max]) continue;
      num += need;
    }
    
    ans = min(ans, num);
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'n' was not declared in this scope
    8 |   rep(i,n) cin >> p[i] >> c[i];
      |         ^
a.cc:2:35: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i=0; i<(n); i++)
      |                                   ^