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

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

int main(int argc, char* argv[])
{
  int i, n, a, b, cmp;
  char s1[200], s2[100];

  scanf("%d", &n);
  a = b = 0;
  for(i = 0; i < n; i++){
    scanf("%s %s", s1, s2);
    cmp = strcmp(s1, s2);
    if(0 < smp){
      a += 3;
    }else if(smp < 0){
      b += 3;
    }else if(cmp == 0){
      a += 1;
      b += 1;
    }
  }
  printf("%d %d\n", a, b);
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:14:12: error: 'smp' undeclared (first use in this function); did you mean 'cmp'?
   14 |     if(0 < smp){
      |            ^~~
      |            cmp
main.c:14:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  string tarou,hanako;
  cin>>n;
  int t=0,h=0;
  for(int i=0;i<n;i++){
    cin>>tarou>>hanako;
    if(tarou>hanako) t+=3;
    else(hanako>tarou) h+=3;
    else{
      t++;
      h++;
    }
  }
  cout<<t<<" "<<h<<endl;
  return 0;
}
    



Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before 'h'
   11 |     else(hanako>tarou) h+=3;
      |                       ^~
      |                       ;
a.cc:11:16: warning: ignoring return value of 'bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   11 |     else(hanako>tarou) h+=3;
      |         ~~~~~~~^~~~~~~
In file included 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/basic_string.h:3915:5: note: declared here
 3915 |     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else{
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a=0,b=0;
    cin>>n;
    while(n--){
        string s1,s2;
        cin>>s1>>s2;
        if(s1>s2)a+=3;
        else if(a1<s2)b+=3;
        else a++,b++;
    }
    cout<<a<<' '<<b<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'a1' was not declared in this scope; did you mean 's1'?
   10 |         else if(a1<s2)b+=3;
      |                 ^~
      |                 s1
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n=0,sum1=0,sum2=0;
    string str1,str2;
    cin >> n;
    for(i=0;n>i;i++){
        cin >> str1 >> str2;
        if(str1==str2){
            sum1++;
            sum2++;
        }
        else if(str1>str2) str1+=3;
        else if(str1<str2) str2+=3;
        str1="";
        str2="";
    }
    cout << str1 << " " << str2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i=0;n>i;i++){
      |         ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
	unsigned int n;
	cin >> n;
	unsigned int ts = 0;
	unsigned int hs = 0;

	for (unsigned int i = 0; i < n; ++i) {
		cin >> t >> h;
		if (t == h) {
			ts += 1;
			hs += 1;
		}
		if (t < h) {
			hs += 3;
		} else {
			ts += 3;
		}
	}
	cout << ts << " " << hs << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 't' was not declared in this scope
   14 |                 cin >> t >> h;
      |                        ^
a.cc:14:29: error: 'h' was not declared in this scope
   14 |                 cin >> t >> h;
      |                             ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(void){
    int n;
    int taro=0,hanako=0;
    char string1[101],string2[101];
    cin >> n;

    for(int i = 0;i<n;i++){
        cin >> string1 >> string2;
        if(strcmp(string1,string2)==0){
            taro++;
            hanako++;

        }else if(strcmp(string1,string2)>0){
            taro+=3;
            //taro=taro+3;
        }else{
            hanako+=3;
            //hanako=hanako+3;
        }

    }
    cout << taro << " " << hanako << endl;
}


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

#include<iostream>
#include <stdio.h>
#include<string>
using namespace std;

int main(void){
    int n;
    int taro=0,hanako=0;
    char string1[101],string2[101];
    cin >> n;

    for(int i = 0;i<n;i++){
        cin >> string1 >> string2;
        if(strcmp(string1,string2)==0){
            taro++;
            hanako++;

        }else if(strcmp(string1,string2)>0){
            taro+=3;
            //taro=taro+3;
        }else{
            hanako+=3;
            //hanako=hanako+3;
        }

    }
    cout << taro << " " << hanako << endl;
}


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

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<cctype>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
int n;
string data[2][1000];
int score[2];
for(int i = 0; i < 2; i++){
  score[i] = 0;
}
cin >> n;
for(int i = 0; i < n; i++){
for(int j = 0; j < 2; j++){
  cin >> data[j][i];

  if(data[0][i] == data[1][i]){
  count[j]++;
  }else if(data[0][i] < data[1][i]){
  count[1]++;
  }else if(data[0][i] > data[1][i]){
  count[0]++;
  }
}
}
for(int i = 0; i < 2; i++){
  cout << count[i] ;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |   count[j]++;
      |        ^
a.cc:25:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   25 |   count[1]++;
      |        ^
a.cc:27:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   27 |   count[0]++;
      |        ^
a.cc:32:16: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |   cout << count[i] ;
      |                ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<cctype>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
int n;
string data[2][1000];
int score[2];
for(int i = 0; i < 2; i++){
  score[i] = 0;
}
cin >> n;
for(int i = 0; i < n; i++){
for(int j = 0; j < 2; j++){
  cin >> data[j][i];

  if(data[0][i] == data[1][i]){
  count[j]++;
  }else if(data[0][i] < data[1][i]){
  count[1]++;
  }else if(data[0][i] > data[1][i]){
  count[0]++;
  }
}
}
for(int i = 0; i < 2; i++){
  cout << count[i];
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |   count[j]++;
      |        ^
a.cc:25:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   25 |   count[1]++;
      |        ^
a.cc:27:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   27 |   count[0]++;
      |        ^
a.cc:32:16: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |   cout << count[i];
      |                ^
Language: C++

#include <iostream>
using namespace std;

int strcmp(string, string);

int main(){
  int n;
  string card_t,card_h;
  int score_t=0;
  int score_h=0;

  cin >> n;
  for(int i=0; i<n; i++){
    cin >> card_t >> card_h;
    switch(strcmp(card_t, card_h)){
      case -1:
        score_t+=3;
        break;
      case 1:
        score_h+=3;
        break;
      case 0:
        score_t+=1;
        score_h+=1;
        break;
    }
  }
  cout << score_t << " " << score_h << endl;
  return 0;
}



Compiler output:
/usr/bin/ld: /tmp/ccFr9Gth.o: in function `main':
a.cc:(.text+0xc3): undefined reference to `strcmp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main() {
	int n,t_card,h_card,t_point,h_point;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> t >> h;
		if(t_card > h_card){
			taro += 3;
		}else if(t_card < h_card){
			hanako += 3;
		}else{
			t_point++;
			h_point++;
		}
	}
	cout << t_point << " " << h_point << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 't' was not declared in this scope
    9 |                 cin >> t >> h;
      |                        ^
a.cc:9:29: error: 'h' was not declared in this scope
    9 |                 cin >> t >> h;
      |                             ^
a.cc:11:25: error: 'taro' was not declared in this scope
   11 |                         taro += 3;
      |                         ^~~~
a.cc:13:25: error: 'hanako' was not declared in this scope
   13 |                         hanako += 3;
      |                         ^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main() {
	int n,t_card,h_card,t_point,h_point;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> t_card >> h_card;
		if(t_card > h_card){
			taro += 3;
		}else if(t_card < h_card){
			hanako += 3;
		}else{
			t_point++;
			h_point++;
		}
	}
	cout << t_point << " " << h_point << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'taro' was not declared in this scope
   11 |                         taro += 3;
      |                         ^~~~
a.cc:13:25: error: 'hanako' was not declared in this scope
   13 |                         hanako += 3;
      |                         ^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main() {
	int n,t_point,h_point;
	string t_card;
	string h_card;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> t_card >> h_card;
		if(t_card > h_card){
			t_point += 3;
		}else if(t_card < h_card){
			h_point += 3;
		}else{
			t_point++;
			h_point++;
		}
		t_card = a;
		h_card = a;
	}
	cout << t_point << " " << h_point << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: 'a' was not declared in this scope
   20 |                 t_card = a;
      |                          ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(void){
  int n,i;
  cin >> n;
  string s1,s2;
  int taro = 0, hanako = 0;
  for(i = 0; i < n; i++){
    cin >> s1 >> s2;
    if(s1.compare(s2)==0) {
      taro++;hanako++;
    }
    else if(s1.compare(s2)>0){
        taro+=3;
    }
    else{
    hanako+=3;
    }
  }
  cout << taro << " " << hanako << endl;
}

Compile Error Logs:

Status
Judge: 4/4	C++14	CPU: 00:00 sec	Memory: 3160 KB	Length: 374 B	2019-05-28 09:20
Results for testcases
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1	: Accepted	00:00	2992	18	4	testcase_00
Case #2	: Accepted	00:00	3160	119	6	testcase_01
Case #3	: Accepted	00:00	3160	1310	8	testcase_02
Case #4	: Accepted	00:00	3020	5951	10	testcase_03

< prev |		/		| next >	 		
 
Judge Input #  ( | )		Judge Output #  ( | )



Compiler output:
a.cc:27:84: error: invalid digit "9" in octal constant
   27 | Judge: 4/4      C++14   CPU: 00:00 sec  Memory: 3160 KB Length: 374 B   2019-05-28 09:20
      |                                                                                    ^~
a.cc:29:6: error: stray '#' in program
   29 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
a.cc:30:6: error: stray '#' in program
   30 | Case #1 : Accepted      00:00   2992    18      4       testcase_00
      |      ^
a.cc:31:6: error: stray '#' in program
   31 | Case #2 : Accepted      00:00   3160    119     6       testcase_01
      |      ^
a.cc:32:6: error: stray '#' in program
   32 | Case #3 : Accepted      00:00   3160    1310    8       testcase_02
      |      ^
a.cc:33:6: error: stray '#' in program
   33 | Case #4 : Accepted      00:00   3020    5951    10      testcase_03
      |      ^
a.cc:37:13: error: stray '#' in program
   37 | Judge Input #  ( | )            Judge Output #  ( | )
      |             ^
a.cc:37:46: error: stray '#' in program
   37 | Judge Input #  ( | )            Judge Output #  ( | )
      |                                              ^
a.cc:24:1: error: 'Compile' does not name a type
   24 | Compile Error Logs:
      | ^~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
using namespace std;

int main() {
    int n;
    int taro = 0, hanako = 0;
    string tarocard, hanakocard;
    cin >> n;
    
    for (int i = 0; i < n; i++) {
        cin >> tarocard >> hanakocard;
        if(tarocard.compare(hanakocard) == 0) taro++; hanako++;
        else if (tarocard.compare(hanakocard) > 0) taro += 3;
        else hanako += 3;
    }
    cout << taro << " " << hanako;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'else' without a previous 'if'
   15 |         else if (tarocard.compare(hanakocard) > 0) taro += 3;
      |         ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(void){
    int Tarou = 0;
    int Hanako = 0;
    int cards;
    string card1,card2;
    cin >> cards;
    for (int i = 0;i < n;i++){
        cin >> card1 >> card2;
        if (card1.compare(card2)==0) {
            Tarou += 1;
            Hanako += 1;
        }
        else if(card1.compare(card2)>0) {
            t += 3;
        }
        else {
            h += 3;
        }
        cout << Tarou << " " << Hanako << endl;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'n' was not declared in this scope
   11 |     for (int i = 0;i < n;i++){
      |                        ^
a.cc:18:13: error: 't' was not declared in this scope
   18 |             t += 3;
      |             ^
a.cc:21:13: error: 'h' was not declared in this scope
   21 |             h += 3;
      |             ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(void){
    int Tarou = 0;
    int Hanako = 0;
    int cards;
    string card1,card2;
    cin >> cards;
    for (int i = 0;i < cards;i++){
        cin >> card1 >> card2;
        if (card1.compare(card2)==0) {
            Tarou += 1;
            Hanako += 1;
        }
        else if(card1.compare(card2)>0) {
            t += 3;
        }
        else {
            h += 3;
        }
        cout << Tarou << " " << Hanako << endl;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 't' was not declared in this scope
   18 |             t += 3;
      |             ^
a.cc:21:13: error: 'h' was not declared in this scope
   21 |             h += 3;
      |             ^
Language: C++

#include <iostream>
#include <string>
#include <string.h>
using namespace std;
int main(){
    int n;
    int a=0;b=0;
    string str1,str2;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>str1>>str2;
        if(str1==str2){
            a++;
            b++;
        }
        else if(str1<str2){
            b=b+3;
        }
        else if(str1>str2){
            a=a+3;
        }
    }
    cout<<a<<" "<<b<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'b' was not declared in this scope
    7 |     int a=0;b=0;
      |             ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
iht main(){
    int n,a=0,b=0;
    string x,y;
    cin >> n;
    
    for(int i=0;i<n;i++)
    
    
}


Compiler output:
a.cc:4:1: error: 'iht' does not name a type; did you mean 'int'?
    4 | iht main(){
      | ^~~
      | int
Language: C++

#include<iostream>
#include<string>
using namespace std;
iht main(){
    int n,a=0,b=0;
    string x,y;
    cin >> n;
    
    for(int i=0;i<n;i++){
        cin >> x >> y;
    }
    
    
}


Compiler output:
a.cc:4:1: error: 'iht' does not name a type; did you mean 'int'?
    4 | iht main(){
      | ^~~
      | int
Language: C++

#include<iostream>
#include<string>
using namespace std;
iht main(){
    int n,a=0,b=0;
    string x,y;
    cin >> n;
    
    for(int i=0;i<n;i++){
        cin >> x >> y;
        if(x>y) a+=3;
        else if(x<y) b+=3;
        else{
            a++;
            b++;
        }
    }
    
    
}


Compiler output:
a.cc:4:1: error: 'iht' does not name a type; did you mean 'int'?
    4 | iht main(){
      | ^~~
      | int
Language: C++

#include<iostream>
#include<string>
using namespace std;
iht main(){
    int n,a=0,b=0;
    string x,y;
    cin >> n;
    
    for(int i=0;i<n;i++){
        cin >> x >> y;
        if(x>y) a+=3;
        else if(x<y) b+=3;
        else{
            a++;
            b++;
        }
    }cout << a << b << endl
    
    
}


Compiler output:
a.cc:4:1: error: 'iht' does not name a type; did you mean 'int'?
    4 | iht main(){
      | ^~~
      | int
Language: C++

#include<iostream>
#include<string>
using namespace std;
iht main(){
    int n,a=0,b=0;
    string x,y;
    cin >> n;
    
    for(int i=0;i<n;i++){
        cin >> x >> y;
        if(x>y) a+=3;
        else if(x<y) b+=3;
        else{
            a++;
            b++;
        }
    }cout << a << b << endl;
    
    
}


Compiler output:
a.cc:4:1: error: 'iht' does not name a type; did you mean 'int'?
    4 | iht main(){
      | ^~~
      | int
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string h_card,t_card;
    int n,hanako,taro;
    cin >> n;
    for(int i = 1; i <= n){
        cin >> t_card >> h_card;
        if(t_card > h_card){
            taro += 3;
        }
        else if(t_card == h_card){
            taro ++;
            hanako ++;
        }
        else{
            hanako += 3
        }
        cout << taro << " " << hanako << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before ')' token
    8 |     for(int i = 1; i <= n){
      |                          ^
      |                          ;
a.cc:18:24: error: expected ';' before '}' token
   18 |             hanako += 3
      |                        ^
      |                        ;
   19 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string h_card,t_card;
    int n,hanako,taro;
    cin >> n;
    for(int i = 1; i <= n){
        cin >> t_card >> h_card;
        if(t_card > h_card){
            taro += 3;
        }
        else if(t_card == h_card){
            taro ++;
            hanako ++;
        }
        else{
            hanako += 3;
        }
        cout << taro << " " << hanako << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before ')' token
    8 |     for(int i = 1; i <= n){
      |                          ^
      |                          ;
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
    
    int n;
    string str1 str2;
    int a = 0, b = 0;
    
    cin >> n;
    for ( int i = 0; i < n; i++){
        cin >> str1 >> str2;
        if ( str1 == str2 ){
            a++;
            b++;
        }
        else if ( str1 > str2 ) a += 3;
        else b += 3;
    }
    cout << a << b << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected initializer before 'str2'
    8 |     string str1 str2;
      |                 ^~~~
a.cc:13:16: error: 'str1' was not declared in this scope
   13 |         cin >> str1 >> str2;
      |                ^~~~
a.cc:13:24: error: 'str2' was not declared in this scope
   13 |         cin >> str1 >> str2;
      |                        ^~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main () {
    int i, taro=0, hanako=0;
    string t, h;
    for(i=0;i<n;i++) {
        cin >> t >> h;
        if(t.compare(h) > 0) taro+=3;
        else if(t.compare(h) < 0) hanako+=3;
        else {taro++; hanako++;}
    }
    cout << taro << " " << hanako;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'n' was not declared in this scope
    9 |     for(i=0;i<n;i++) {
      |               ^
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<cctype>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
        int n;
        int t=0;
        int h=0;
        cin>>n;
        for(int i=0;i<n;i++){
                char x[100],y[100];
                scanf("%s %s",x,y);
                if (strcmp(x,y)==0) {
                        t+=1;
                        h+=1;
                } else if (strcmp(x,y)<0) {
                        h+=3;
                } else {
                        t+=3;
                }
        }
        printf("%d %d\n",t,h);
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'strcmp' was not declared in this scope
   16 |                 if (strcmp(x,y)==0) {
      |                     ^~~~~~
a.cc:7:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include<algorithm>
  +++ |+#include <cstring>
    7 | using namespace std;
Language: C++

#include <iostream>
#include <string>
#include <cstdio>
#include <cmath>

using namespace std;

int main(void)
{	
	int num;
	cin >> num;
	int p1 = 0, p2 = 0;

	for (int i = 0; i < num; i++)
	{
		string w1, w2;
		cin >> w1;
		cin >> w2;

		if (w1 > w2)
			p2 += 3;
		else if (w2 > w1)
			p1 += 3;
		else(w1 == w2)
			p1++;
			p2++;

	}
	cout << p1 << " " << p2 << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:31: error: expected ';' before 'p1'
   24 |                 else(w1 == w2)
      |                               ^
      |                               ;
   25 |                         p1++;
      |                         ~~     
a.cc:24:25: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   24 |                 else(w1 == w2)
      |                     ~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3755:5: note: declared here
 3755 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main()
{

	int n;
	int ts = 0;
	int hs = 0;
	char taro[100+1] = {};
	char hana[100+1] = {};;
	scanf("%d", &n);
	while (n)
	{
		scanf("%s %s", taro, hana);
		int tlen = strlen(taro);
		int hlen = strlen(hana);
		int len = tlen < hlen ? tlen : hlen;
		// s1 > s2 ??§??£?????????s1 < s2 ??§?????????
		int cmp = strncmp(taro, hana, len);
		if (cmp > 0)
		{
			ts += 3;
		}
		else if (cmp < 0)
		{
			hs += 3;
		}
		else
		{
			ts++;
			hs++;
		}
		n--;
	}
	cout << ts << " " << hs << endl;
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: 'strlen' was not declared in this scope
   19 |                 int tlen = strlen(taro);
      |                            ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdlib>
  +++ |+#include <cstring>
    4 | 
a.cc:23:27: error: 'strncmp' was not declared in this scope
   23 |                 int cmp = strncmp(taro, hana, len);
      |                           ^~~~~~~
a.cc:23:27: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <string>

using namespace std;;

int main() {
  int i, n, one, two;
  string p1, p2;

  cin >> n;
  one = 0 two = 0;

  for (i=0; i < n; i++) {
    cin >> p1 >> p2;

    if (p1 == p2) {
      one += 1;
      two += 1;
    }
    else if (p1 > p2) {
      one += 3;
    }
    else if (p1 < p2) {
      two += 3;
    }
  }

  cout << one << two << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected ';' before 'two'
   11 |   one = 0 two = 0;
      |          ^~~~
      |          ;
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	/*string?????§?°?????????§????????????????????????*/
	int n;
	cin >> n;
	int a = b = 0;
	REP(i,n){
		string sa,sb;
		cin >> sa >> sb;
		if(sa==sb){
			a++; b++;
		}else if(sa < sb){
			a+=3;
		}else if(sa > sb){
			b+=3;
		}
	}
	cout << a << " " << b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'b' was not declared in this scope
   30 |         int a = b = 0;
      |                 ^
Language: C++

taro = 0
hanako = 0
n = int(input())
for _ in range(n):
    taro_card, hanako_card = input().split()
    if taro_card > hanako_card:
        taro += 3
    elif taro_card < hanako_card:
        hanako += 3
    else:
        taro += 1
        hanako += 1
    print(taro, hanako)
print(taro, hanako)

Compiler output:
a.cc:1:1: error: 'taro' does not name a type
    1 | taro = 0
      | ^~~~
Language: C++

#include <algorithm>
#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <cctype>

using namespace std;

int main(void) {

    int n;
    cin >> n;

    int taro = 0, hanako = 0;
    for (int i = 0; i < n; ++i) {
        string tw, hw;
        cin >> tw >> hw;
        switch (tw.compare(hw)) {
            case -1:
                hanako += 3;
                break;
            case 1:
                taro += 3;
                break;
            case 0:
                ++hanako;
                ++taro;
                break;
            default:
                break;
        }
    }

    printf("%d %d\n", taro, hanako)i;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:36: error: expected ';' before 'i'
   35 |     printf("%d %d\n", taro, hanako)i;
      |                                    ^
      |                                    ;
Language: C++

public class Main {
    public static void main(String[] args) {

        java.util.Scanner sc = new java.util.Scanner(System.in);
        int n = sc.nextInt();

        int taro_point = 0, hanako_point = 0;
        String taro_card, hanako_card;
        for (int i = 0; i < n; i ++) {
            taro_card = sc.next();
            hanako_card = sc.next();
            if (taro_card.compareToIgnoreCase(hanako_card) > 0) { taro_point += 3; }
            else if (taro_card.compareToIgnoreCase(hanako_card) == 0) { hanako_point ++; taro_point ++; }
            else (taro_card.compareToIgnoreCase(hanako_card) < 0) { hanako_point += 3; }
        }
        System.out.println(taro_point + " " + hanako_point);
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;
#include <stdio.h>
#include <string.h>
int main()
{
	int n, T = 0, H = 0, c;
	char a[101], b[101];
	scanf_s("%d", &n);
	for (int i = 0; i < n; i++){
		scanf_s("%s %s", a, 100, b, 100);
		c = strcmp(a, b);
		if (c == 1) { T += 3; }
		if (c == 0) { T++; H++; }
		if (c == -1) { H += 3; }
	}
	printf("%d %d", T, H);
	scanf_s("%d", &n);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
int main()
{
  int tt,ht,i,j,k,n;
  char tk[101],hk[101],s;
  sacnf("%d%c",&n,&s);
  for(i=0;i<n;i++){
    j=0;
    while(1){
      scanf("%c",&tk[j]);
      if(tk[0]=='\n'){
	continue;
      }
      if(tk[j]==' '){
	break;
      }
      j++;
    }
    while(1){
      scanf("%c",&hk[k]);
      if(hk[k]=='\n'||tk[k]==' '){
	if('a'<tk[k]&&tk[k]<'z'){
	  tt+=3;
	  break;
	}else if('a'<hk[k]&&hk[k]<'z'){
	  ht+=3;
	  break;
	}else if(hk[k]=='\n'&&tk[k]==' '){
	  ht++;
	  tt++;
	  break;
	}
      }
      if(hk[k]==tk[k]){
	k++;
      }else if(hk[k]>tk[k]){
	ht+=3;
	break;
      }else if(tk[k]>hk[k]){
	tt+=3;
	break;
      }
    }
    k=0;
  }
  printf("%d %d",tt,ht);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
    6 |   sacnf("%d%c",&n,&s);
      |   ^~~~~
      |   scanf
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	int time,taro=0,hana=0;
	char a[100],b[100];
	cin >>time;
	for(int abc=0;abc<time;abc++){
		cin>>a>>b;
		if(strcmp(a,b)==1){
			taro+=3;
		}else if(strcmp(a,b)==-1){
			hana+=3;
		}else{
			taro++;
			hana++;
		}
	}
	cout<<taro<< " "<<hana<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'strcmp' was not declared in this scope
   10 |                 if(strcmp(a,b)==1){
      |                    ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	int jage1=0,jage2=0,time;
	char card1[100],card2[100];
	cin>>time;
	for(int abc=0;abc<time;abc++){
		cin>>card1>>card2;
		if(strcmp(card1,card2)>0){
			jage1+=3;
		}else if(strcmp(card1,card2)<0){
			jage2+=3;
		}else{
			jage1++;
			jage2++;
		}
	}
	cout<<jage1<<" "<<jage2<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'strcmp' was not declared in this scope
   10 |                 if(strcmp(card1,card2)>0){
      |                    ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include<iostream>
#include <string>
using namespace std;

int main(){
  int taro, hanako, n, res;
  char t_card[100], h_card[100];

  taro = 0;
  hanako = 0;

  cin >> n;

  for(int i = 0; i < n; i++){
    cin >> t_card >> h_card;
    res = strcmp(t_card, h_card);
    if(res < 0 ) taro = taro + 3;
    else if(res > 0) hanako = hanako + 3;
    else{
      taro++;
      hanako++;
    }
    cout << taro << ' ' << hanako;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'strcmp' was not declared in this scope
   16 |     res = strcmp(t_card, h_card);
      |           ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include<iostream>
#include <string>
using namespace std;

int main(){
  int taro, hanako, n, res;
  char t_card[100], h_card[100];

  taro = 0;
  hanako = 0;

  cin >> n;

  for(int i = 0; i < n; i++){
    cin >> t_card >> h_card;
    res = strcmp(t_card, h_card);
    if(res < 0 ) taro = taro + 3;
    else if(res > 0) hanako = hanako + 3;
    else{
      taro++;
      hanako++;
    }
    cout << taro << ' ' << hanako;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'strcmp' was not declared in this scope
   16 |     res = strcmp(t_card, h_card);
      |           ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_LEN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score endl;
   
    free(Taro);
    free(Hanako);

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
            }
         }
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:59: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |          } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
      |                                                 ~~~~~~~~~~^~~~~~
      |                                                                 ()
a.cc:39:38: error: expected ';' before 'endl'
   39 |     cout << T_score << " " << H_score endl;
      |                                      ^~~~~
      |                                      ;
a.cc: In function 'int is_only_lower(std::string)':
a.cc:56:5: warning: no return statement in function returning non-void [-Wreturn-type]
   56 |     }
      |     ^
a.cc: At global scope:
a.cc:58:5: error: expected unqualified-id before 'if'
   58 |     if (str[i] == '\0') {
      |     ^~
a.cc:60:7: error: expected unqualified-id before 'else'
   60 |     } else {
      |       ^~~~
a.cc:63:1: error: expected declaration before '}' token
   63 | }
      | ^
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_TURN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score endl;
   
    free(Taro);
    free(Hanako);

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
            }
         }
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:59: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |          } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
      |                                                 ~~~~~~~~~~^~~~~~
      |                                                                 ()
a.cc:39:38: error: expected ';' before 'endl'
   39 |     cout << T_score << " " << H_score endl;
      |                                      ^~~~~
      |                                      ;
a.cc: In function 'int is_only_lower(std::string)':
a.cc:56:5: warning: no return statement in function returning non-void [-Wreturn-type]
   56 |     }
      |     ^
a.cc: At global scope:
a.cc:58:5: error: expected unqualified-id before 'if'
   58 |     if (str[i] == '\0') {
      |     ^~
a.cc:60:7: error: expected unqualified-id before 'else'
   60 |     } else {
      |       ^~~~
a.cc:63:1: error: expected declaration before '}' token
   63 | }
      | ^
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_TURN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score << endl;
   
    free(Taro);
    free(Hanako);

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
            }
         }
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:59: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |          } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
      |                                                 ~~~~~~~~~~^~~~~~
      |                                                                 ()
a.cc: In function 'int is_only_lower(std::string)':
a.cc:56:5: warning: no return statement in function returning non-void [-Wreturn-type]
   56 |     }
      |     ^
a.cc: At global scope:
a.cc:58:5: error: expected unqualified-id before 'if'
   58 |     if (str[i] == '\0') {
      |     ^~
a.cc:60:7: error: expected unqualified-id before 'else'
   60 |     } else {
      |       ^~~~
a.cc:63:1: error: expected declaration before '}' token
   63 | }
      | ^
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_TURN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score << endl;
   
    free(Taro);
    free(Hanako);

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
         }         
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:59: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |          } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
      |                                                 ~~~~~~~~~~^~~~~~
      |                                                                 ()
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_TURN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score << endl;
   
    delete[] Taro;
    delete[] Hanako;

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
         }         
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:59: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |          } while (Taro[i].length() > MAX_LEN || Hanako[i].length > MAX_LEN ||
      |                                                 ~~~~~~~~~~^~~~~~
      |                                                                 ()
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_TURN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (size[i].length() > MAX_LEN || size[i].length > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score << endl;
   
    delete[] Taro;
    delete[] Hanako;

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
         }         
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   26 |          } while (size[i].length() > MAX_LEN || size[i].length > MAX_LEN ||
      |                       ^
a.cc:26:53: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   26 |          } while (size[i].length() > MAX_LEN || size[i].length > MAX_LEN ||
      |                                                     ^
Language: C++

#include <iostream>
#include <string>

#define MAX_TURN (1000)
#define MAX_LEN  (100)

using namespace std;

int is_only_lower(string str);

int main()
{    
    int  n;
    int  T_score = 0, H_score = 0;
    
    do {
        cin >> n;
    } while (n > MAX_TURN);
   
    string* Taro = new string[n];
    string* Hanako = new string[n];
   
    for (int i = 0; i < n; i++) {
         do {
             cin >> Taro[i] >> Hanako[i];	     
	 } while (Taro[i].size() > MAX_LEN || Hanako[i].size > MAX_LEN ||
                  is_only_lower(Taro[i]) == 0 || is_only_lower(Hanako[i]) == 0);

	 if (Taro[i] > Hanako[i]) {
	     T_score += 3;
         } else if (Taro[i] == Hanako[i]) {
	     T_score += 1;
             H_score += 1;
         } else {
	     H_score += 3;
         }
    }
	     
    cout << T_score << " " << H_score << endl;
   
    delete[] Taro;
    delete[] Hanako;

    return (0);
}

int is_only_lower(string str)
{   
    int i;

    for (i = 0; str[i] != '\0'; i++) {
         if (str[i] < 'a' || str[i] > 'z') {
	     break;
         }         
    }
 
    if (str[i] == '\0') {
        return (1);
    } else {
        return (0);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:57: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   26 |          } while (Taro[i].size() > MAX_LEN || Hanako[i].size > MAX_LEN ||
      |                                               ~~~~~~~~~~^~~~
      |                                                             ()
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

int main() {
	int n, i, j, k,c,d;
	c = 0;
	d = 0;
	k = 0;
	char a[100], b[100];
	cin >> n;
	for (i = 0; i < n; i++) {
		for (j = 0; j < 100; j++) {
			scanf_s("%c", &a[j]);
			if (a[j] == ' ')break;
		}
		for (j = 0; j < 100; j++) {
			scanf_s("%c", &b[j]);
			if (b[j] == '\n')break;
		}
		for (j = 0; j < 100; j++) {
			if (a[j] < b[j]) {
				c += 3;
				k = 1;
				break;
			}
			if (a[j] > b[j]) {
				d += 3;
				k = 1;
				break;
			}
		}
		if (k == 1) {
			c++;
			d++;
		}
	}
	cout << c << " " << d << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   14 |                         scanf_s("%c", &a[j]);
      |                         ^~~~~~~
      |                         scanf
a.cc:18:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |                         scanf_s("%c", &b[j]);
      |                         ^~~~~~~
      |                         scanf