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

#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;


int main(){
  string s; cin >> s;
  if(s="SAT") cout << 1 << endl;
  else if(s="SAN") cout << 7 << endl;
  else if(s="MON") cout << 6 << endl;
  else if(s="TUE") cout << 5 << endl;
  else if(s="WED") cout << 4 << endl;
  else if(s="TUR") cout << 3 << endl;
  else cout << 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"SAT"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   if(s="SAT") cout << 1 << endl;
      |      ~^~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
a.cc:14:12: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"SAN"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   else if(s="SAN") cout << 7 << endl;
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:15:12: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"MON"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   else if(s="MON") cout << 6 << endl;
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:16:12: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"TUE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |   else if(s="TUE") cout << 5 << endl;
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:17:12: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"WED"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |   else if(s="WED") cout << 4 << endl;
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:18:12: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"TUR"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   18 |   else if(s="TUR") cout << 3 << endl;
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main (){
  string S;
  cin >> S;

  if(n == "SUN") cout << 7 << endl;
  if(n == "MON") cout << 6 << endl;
  if(n == "TUE") cout << 5 << endl;
  if(n == "WED") cout << 4 << endl;
  if(n == "THU") cout << 3 << endl;
  if(n == "FRI") cout << 2 << endl;
  if(n == "SAT") cout << 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 'n' was not declared in this scope
   10 |   if(n == "SUN") cout << 7 << endl;
      |      ^
a.cc:11:6: error: 'n' was not declared in this scope
   11 |   if(n == "MON") cout << 6 << endl;
      |      ^
a.cc:12:6: error: 'n' was not declared in this scope
   12 |   if(n == "TUE") cout << 5 << endl;
      |      ^
a.cc:13:6: error: 'n' was not declared in this scope
   13 |   if(n == "WED") cout << 4 << endl;
      |      ^
a.cc:14:6: error: 'n' was not declared in this scope
   14 |   if(n == "THU") cout << 3 << endl;
      |      ^
a.cc:15:6: error: 'n' was not declared in this scope
   15 |   if(n == "FRI") cout << 2 << endl;
      |      ^
a.cc:16:6: error: 'n' was not declared in this scope
   16 |   if(n == "SAT") cout << 1 << endl;
      |      ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main (){
  string S;
  cin >> S;

  if(n == 'SUN') cout << 7 << endl;
  if(n == 'MON') cout << 6 << endl;
  if(n == 'TUE') cout << 5 << endl;
  if(n == 'WED') cout << 4 << endl;
  if(n == 'THU') cout << 3 << endl;
  if(n == 'FRI') cout << 2 << endl;
  if(n == 'SAT') cout << 1 << endl;
}

Compiler output:
a.cc:10:11: warning: multi-character character constant [-Wmultichar]
   10 |   if(n == 'SUN') cout << 7 << endl;
      |           ^~~~~
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |   if(n == 'MON') cout << 6 << endl;
      |           ^~~~~
a.cc:12:11: warning: multi-character character constant [-Wmultichar]
   12 |   if(n == 'TUE') cout << 5 << endl;
      |           ^~~~~
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 |   if(n == 'WED') cout << 4 << endl;
      |           ^~~~~
a.cc:14:11: warning: multi-character character constant [-Wmultichar]
   14 |   if(n == 'THU') cout << 3 << endl;
      |           ^~~~~
a.cc:15:11: warning: multi-character character constant [-Wmultichar]
   15 |   if(n == 'FRI') cout << 2 << endl;
      |           ^~~~~
a.cc:16:11: warning: multi-character character constant [-Wmultichar]
   16 |   if(n == 'SAT') cout << 1 << endl;
      |           ^~~~~
a.cc: In function 'int main()':
a.cc:10:6: error: 'n' was not declared in this scope
   10 |   if(n == 'SUN') cout << 7 << endl;
      |      ^
a.cc:11:6: error: 'n' was not declared in this scope
   11 |   if(n == 'MON') cout << 6 << endl;
      |      ^
a.cc:12:6: error: 'n' was not declared in this scope
   12 |   if(n == 'TUE') cout << 5 << endl;
      |      ^
a.cc:13:6: error: 'n' was not declared in this scope
   13 |   if(n == 'WED') cout << 4 << endl;
      |      ^
a.cc:14:6: error: 'n' was not declared in this scope
   14 |   if(n == 'THU') cout << 3 << endl;
      |      ^
a.cc:15:6: error: 'n' was not declared in this scope
   15 |   if(n == 'FRI') cout << 2 << endl;
      |      ^
a.cc:16:6: error: 'n' was not declared in this scope
   16 |   if(n == 'SAT') cout << 1 << endl;
      |      ^
Language: C++

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

int main(){
  umap<string,int> mp;
  mp["SUN"] = 7;
  mp["MON"] = 6;
  mp["TUE"] = 5;
  mp["WED"] = 4;
  mp["THU"] = 3;
  mp["FRI"] = 2;
  mp["SAT"] = 1;
  string s; cin>>s;
  cout << mp[s]; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'umap' was not declared in this scope
    5 |   umap<string,int> mp;
      |   ^~~~
a.cc:5:14: error: expected primary-expression before ',' token
    5 |   umap<string,int> mp;
      |              ^
a.cc:5:15: error: expected primary-expression before 'int'
    5 |   umap<string,int> mp;
      |               ^~~
a.cc:6:3: error: 'mp' was not declared in this scope
    6 |   mp["SUN"] = 7;
      |   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;

#define for0(i, n) for (ll i = 0; i < (ll)(n); ++i) // 0 based indexing
#define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i) // 1 based indexing
#define forc(i, l, r) for (ll i = (ll)(l); i <= (ll)(r); ++i) // closed interver from l to r r inclusive
#define forr0(i, n) for (ll i = (ll)(n) - 1; i >= 0; --i) // reverse 0 based.
#define forr1(i, n) for (ll i = (ll)(n); i >= 1; --i) // reverse 1 based

#define ff first
#define ss second
#define pb push_back

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string  s;
  cin >> s;
  switch (s){
    case "SUN" :
      cout << "7" << endl;
      break;
     case "MON" :
      cout << "6" << endl;
      break;
       case "TUE" :
      cout << "5" << endl;
      break;
       case "WED" :
      cout << "4" << endl;
      break;
       case "THU" :
      cout << "3" << endl;
      break;
       case "FRI" :
      cout << "2" << endl;
      break;
       case "SAT" :
      cout << "1" << endl;
      break;
  }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: switch quantity not an integer
   22 |   switch (s){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  vector<string> week={"SUN","MON","TUE","WED","THU","FRI","SAT"};
  string s;
  cin >> s;
  cout << 7-week.find(s) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'find'
    7 |   cout << 7-week.find(s) << endl;
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  string a[7] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
  string s;
  cin >> s;
  rep(i, 7) {
    if (s==a[i]) {
      cout << 7-i << endl;
      return 0;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   rep(i, 7) {
      |       ^
a.cc:8:3: error: 'rep' was not declared in this scope
    8 |   rep(i, 7) {
      |   ^~~
Language: C++

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

int main()
{
  string s;
  cin >> s;
  
  if (s == "SUN") cout << 7;
  else if (s == "SAT") cout << 1;
  else if (s == "FRI") cout << 2;
  else if (s == "THU") cout << 3;
  else if (s == "WED") cout << 4;
  else if (s == "TUE") cout << 5;
  else if (s == "MON") cout << 6;
  
  cout << endl;
  
  retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: 'retrun' was not declared in this scope
   19 |   retrun 0;
      |   ^~~~~~
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String dofw = sc.next();
    System.out.println(7 - dnum(dofw));
  }
  public static int dnum(String day){
    String[] dsofw = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
    for(int i = 0; i< 7; i++){
      if(day == dsofw[i]){
        return i;
      }
    }
  }
}

Compiler output:
Main.java:15: error: missing return statement
  }
  ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String dofw = sc.next();
    System.out.println(7 - dnum(dofw));
  }
  public static int dnum(String day){
    String[] dsofw = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
    for(int i = 0; i< 7; i++){
      if(day == dsodw[i]){
        return i;
      }
    }
  }
}

Compiler output:
Main.java:11: error: cannot find symbol
      if(day == dsodw[i]){
                ^
  symbol:   variable dsodw
  location: class Main
1 error
Language: C++

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

int main(){
  map<string, int> mp {
    {"SUN", 0},
    {"MON", 1},
    {"TUE", 2},
    {"WED", 3},
    {"THU", 4},
    {"FRI", 5},
    {"SAT", 6}
  }
  string s;
  cin >> s;
  cout << 7 - mp[s] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'string'
   14 |   string s;
      |   ^~~~~~
a.cc:15:10: error: 's' was not declared in this scope
   15 |   cin >> s;
      |          ^
Language: C++

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

int main() {
  string S;
  cin >> S;
  
  vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
  
  for (int i = 0; i < 7; i++){
    if (S == vec.at(i)){
      cout << 7 - i << endl;
    }
  }
}

Compiler output:
a.cc:8:26: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                          ^~~~~
a.cc:8:32: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                ^~~~~
a.cc:8:38: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                      ^~~~~
a.cc:8:44: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                            ^~~~~
a.cc:8:50: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                                  ^~~~~
a.cc:8:56: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                                        ^~~~~
a.cc:8:62: warning: multi-character character constant [-Wmultichar]
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                                              ^~~~~
a.cc: In function 'int main()':
a.cc:8:67: error: could not convert '{5461326, 5066574, 5526853, 5719364, 5523541, 4608585, 5456212}' from '<brace-enclosed initializer list>' to 'std::vector<std::__cxx11::basic_string<char> >'
    8 |   vector<string> vec = { 'SUN','MON','TUE','WED','THU','FRI','SAT'}
      |                                                                   ^
      |                                                                   |
      |                                                                   <brace-enclosed initializer list>
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for (int i = 0; i < 7; i++){
      |   ^~~
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 0; i < 7; i++){
      |                   ^
Language: C

#include<stdio.h>
int main(){
  int i;
  char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
  char day[3];
  scanf("%s",day);
  if(day=="SUN"){
    printf("7");
    return 0;
  }
  for(i=1;i<7;i++){
    if(day==week[i]){
      printf("%d",7-i);
      return 0;
    }
  }
    
}

Compiler output:
main.c: In function 'main':
main.c:4:23: error: excess elements in 'char[7]' initializer
    4 |   char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                       ^~~~~
main.c:4:23: note: (near initialization for 'week')
main.c:4:29: error: excess elements in 'char[7]' initializer
    4 |   char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                             ^~~~~
main.c:4:29: note: (near initialization for 'week')
main.c:4:35: error: excess elements in 'char[7]' initializer
    4 |   char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                                   ^~~~~
main.c:4:35: note: (near initialization for 'week')
main.c:4:41: error: excess elements in 'char[7]' initializer
    4 |   char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                                         ^~~~~
main.c:4:41: note: (near initialization for 'week')
main.c:4:47: error: excess elements in 'char[7]' initializer
    4 |   char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                                               ^~~~~
main.c:4:47: note: (near initialization for 'week')
main.c:4:53: error: excess elements in 'char[7]' initializer
    4 |   char week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                                                     ^~~~~
main.c:4:53: note: (near initialization for 'week')
main.c:12:11: warning: comparison between pointer and integer
   12 |     if(day==week[i]){
      |           ^~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <stdint.h>
#include <queue>
#include <bitset>
#include <iomanip>
#include <vector>

#define PI (3.14159265358979323846)
#define INF (1e+9)
#define DV_NUM (100000007)

using namespace std;
 
int main()
{

 long  A,B,X;
 cin >> A >> B >> X;
 
  long XdivB = X / B;
  long XdivA = X / A;
  long maxInteger = 0;
  
if ( XdivB == 0 || XdivA == 0 ){
   maxInteger = 0;
}else{

  while( XdivA * A + ( (int) log10( XdivA ) + 1 ) * B > X ){ 
      XdivA--;
  }
   if ( Xdiv <= 0){
   maxInteger = 0;
   }else{
   maxInteger = XdivA;
   }
}
 cout << maxInteger << endl;
 
    return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:9: error: 'Xdiv' was not declared in this scope; did you mean 'XdivA'?
   34 |    if ( Xdiv <= 0){
      |         ^~~~
      |         XdivA
Language: C

#include<stdio.h>
int main(void){
  char a;
  scanf("%s",&a);
  if(a==SUN)
    printf("7");
  if(a==MON)
    printf("6");
  if(a==TUE)
    printf("5");
  if(a==WED)
    printf("4");
  if(a==THU)
    printf("3");
  if(a==FRI)
    printf("2");
  if(a==SAT)
    printf("1");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'SUN' undeclared (first use in this function)
    5 |   if(a==SUN)
      |         ^~~
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:9: error: 'MON' undeclared (first use in this function)
    7 |   if(a==MON)
      |         ^~~
main.c:9:9: error: 'TUE' undeclared (first use in this function)
    9 |   if(a==TUE)
      |         ^~~
main.c:11:9: error: 'WED' undeclared (first use in this function)
   11 |   if(a==WED)
      |         ^~~
main.c:13:9: error: 'THU' undeclared (first use in this function)
   13 |   if(a==THU)
      |         ^~~
main.c:15:9: error: 'FRI' undeclared (first use in this function)
   15 |   if(a==FRI)
      |         ^~~
main.c:17:9: error: 'SAT' undeclared (first use in this function)
   17 |   if(a==SAT)
      |         ^~~
Language: C

#include<stdio.h>
int main(void){
  char a;
  scanf("%s",&a);
  if(a==SUN)
    printf("7");
  if(a==MON)
    printf("6");
  if(a==TUE)
    printf("5");
  if(a==WED)
    printf("4");
  if(a==THU)
    printf("3");
  if(a==FRI)
    printf("2");
  if(a==SAT)
    printf("1");

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'SUN' undeclared (first use in this function)
    5 |   if(a==SUN)
      |         ^~~
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:9: error: 'MON' undeclared (first use in this function)
    7 |   if(a==MON)
      |         ^~~
main.c:9:9: error: 'TUE' undeclared (first use in this function)
    9 |   if(a==TUE)
      |         ^~~
main.c:11:9: error: 'WED' undeclared (first use in this function)
   11 |   if(a==WED)
      |         ^~~
main.c:13:9: error: 'THU' undeclared (first use in this function)
   13 |   if(a==THU)
      |         ^~~
main.c:15:9: error: 'FRI' undeclared (first use in this function)
   15 |   if(a==FRI)
      |         ^~~
main.c:17:9: error: 'SAT' undeclared (first use in this function)
   17 |   if(a==SAT)
      |         ^~~
main.c:18:5: error: expected declaration or statement at end of input
   18 |     printf("1");
      |     ^~~~~~
Language: C++

clude <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n_of_digits,A,B,X,counter=0;
    cin>>A>>B>>X;
    n_of_digits=int(floor(log10(X)+1));
    for(int i=1;i<=int(floor(log10(X)+1));i++)
    {
        if(int(floor(log10((X-(B*i))/A)+1))==i)
        {
            if(((X-(B*i))/A)>counter)
                counter=((X-(B*i))/A);
        }
    }
    if(counter>1000000000)
        cout<<1000000000<<endl;
    else
        cout<<counter<<endl;
    return 0;
}


Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>A>>B>>X;
      |     ^~~
a.cc:9:27: error: 'log10' was not declared in this scope
    9 |     n_of_digits=int(floor(log10(X)+1));
      |                           ^~~~~
a.cc:9:21: error: 'floor' was not declared in this scope
    9 |     n_of_digits=int(floor(log10(X)+1));
      |                     ^~~~~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<1000000000<<endl;
      |         ^~~~
a.cc:19:27: error: 'endl' was not declared in this scope
   19 |         cout<<1000000000<<endl;
      |                           ^~~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout<<counter<<endl;
      |         ^~~~
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |         cout<<counter<<endl;
      |                        ^~~~
Language: C++

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

3 int main(){
4 string s;
5 cin >> s;
6 int ans;
7 if(s == "SUN")ans = 7;
8 else if(s == "MON")ans = 6;
9 else if(s == "TUE")ans = 5;
10 else if(s == "WED")ans = 4;
11 else if(s == "THU")ans = 3;
12 else if(s == "FRI")ans = 2;
13 else if(s == "SAT")ans = 1;
14 cout << ans << endl;
15 }

Compiler output:
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 3 int main(){
      | ^
Language: C++

#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <string>
#include <math.h>
#include <iomanip>

using namespace std;

int CountDigit(long long a)
{
  int digit = 0;
  while (a != 0)
  {
    a /= 10;
    ++digit;
  }
  return digit;
}

int main()
{
  long long A, B, X;
  cin >> A >> B >> X;

  if (X > A * 1000000000 + B * 10)
  {
    cout << 1000000000 << endl;
    return;
  }

  long long buy_max = 1000000000, buy_min = 0;
  bool flag;
  while (1)
  {
    long long mid = (buy_max + buy_min) / 2;
    int digit = CountDigit(mid);
    
    if (X > A * mid + B * digit)
    {
      buy_min = mid;
      flag = false;
    }
    else 
    {
      buy_max = mid;
      flag = true;
    }
    if (buy_min + 1 == buy_max) break;
  }

  if(flag == true) cout << buy_max << endl;
  else cout << buy_min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   31 |     return;
      |     ^~~~~~
Language: C++

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

int main(){
  string today;
  cin>>today;
  string week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
  for(int i=0;i<7;i++){
    if(week[i]==today){
      cout<7-i<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |       cout<7-i<<endl;
      |            ~~~^~~~~~
Language: C++

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

int main(){
  string today;
  cin>>today;
  string week[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
  for(int i=0;i<7;i++){
    if(string[i]==today){
      cout<<string[(i+1)%7]<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected unqualified-id before '[' token
    9 |     if(string[i]==today){
      |              ^
a.cc:10:19: error: expected primary-expression before '[' token
   10 |       cout<<string[(i+1)%7]<<endl;
      |                   ^
Language: Java

import java.util.*;

public class Main {
		public static void main(String[] args) {
			
       String a = sc.next();
       
       if(a == "SAT") {
    	   System.out.println(1);
       }else if(a == "FRI") {
    	   System.out.println(2);
       }else if(a == "THU") {
    	   System.out.println(3);
       }else if(a == "WED") {
    	   System.out.println(4);
       }else if(a == "TEU") {
    	   System.out.println(5);
       }else if(a == "MON") {
    	   System.out.println(6);
       }
			
}
}


Compiler output:
Main.java:6: error: cannot find symbol
       String a = sc.next();
                  ^
  symbol:   variable sc
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
		public static void main(String[] args) {
			
       String a = sc.next();
       
       if(a == SAT) {
    	   System.out.println(1);
       }else if(a == "FRI") {
    	   System.out.println(2);
       }else if(a == "THU") {
    	   System.out.println(3);
       }else if(a == "WED") {
    	   System.out.println(4);
       }else if(a == "TEU") {
    	   System.out.println(5);
       }else if(a == "MON") {
    	   System.out.println(6);
       }
			
}
}


Compiler output:
Main.java:6: error: cannot find symbol
       String a = sc.next();
                  ^
  symbol:   variable sc
  location: class Main
Main.java:8: error: cannot find symbol
       if(a == SAT) {
               ^
  symbol:   variable SAT
  location: class Main
2 errors
Language: C++

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

  int main() {
    vector<string> A(7);
    A={"SUN","MON","TUE","WED","THU","FRI","SAT"}
    string S;
    cin >> S;

    for(int i=0; i<7; i++){
      if(A.at(i)==S){
        cout << 8-i << endl;
        break;
    }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:50: error: expected ';' before 'string'
    6 |     A={"SUN","MON","TUE","WED","THU","FRI","SAT"}
      |                                                  ^
      |                                                  ;
    7 |     string S;
      |     ~~~~~~                                        
a.cc:8:12: error: 'S' was not declared in this scope
    8 |     cin >> S;
      |            ^
Language: C++

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

  int main() {
    vector<string> A(7);
    A={"SUN","MON","TUE","WED","THU","FRI","SAT"}
    string S;
    cin >> S ;

    for(int i=0; i<7; i++){
      if(A.at(i)==S){}
        cout << 8-i << endl;
        break;
    }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:50: error: expected ';' before 'string'
    6 |     A={"SUN","MON","TUE","WED","THU","FRI","SAT"}
      |                                                  ^
      |                                                  ;
    7 |     string S;
      |     ~~~~~~                                        
a.cc:8:12: error: 'S' was not declared in this scope
    8 |     cin >> S ;
      |            ^
a.cc: At global scope:
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C

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

    char S[3];
    scanf("%s", S);
    if (S == 'SUN')
    {
        printf("7")
    }
    else if (S == 'MON')
    {
        printf("6");
    }
    else if (S == 'TUE')
    {
        printf("5");
    }
    else if (S == 'WED')
    {
        printf("4");
    }
    else if (S == 'THU')
    {
        printf("3");
    }
    else if (S == 'FRI')
    {
        printf("2");
    }
    else if (S == 'SAT')
    {
        printf("1");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: warning: multi-character character constant [-Wmultichar]
    7 |     if (S == 'SUN')
      |              ^~~~~
main.c:7:11: warning: comparison between pointer and integer
    7 |     if (S == 'SUN')
      |           ^~
main.c:9:20: error: expected ';' before '}' token
    9 |         printf("7")
      |                    ^
      |                    ;
   10 |     }
      |     ~               
main.c:11:19: warning: multi-character character constant [-Wmultichar]
   11 |     else if (S == 'MON')
      |                   ^~~~~
main.c:11:16: warning: comparison between pointer and integer
   11 |     else if (S == 'MON')
      |                ^~
main.c:15:19: warning: multi-character character constant [-Wmultichar]
   15 |     else if (S == 'TUE')
      |                   ^~~~~
main.c:15:16: warning: comparison between pointer and integer
   15 |     else if (S == 'TUE')
      |                ^~
main.c:19:19: warning: multi-character character constant [-Wmultichar]
   19 |     else if (S == 'WED')
      |                   ^~~~~
main.c:19:16: warning: comparison between pointer and integer
   19 |     else if (S == 'WED')
      |                ^~
main.c:23:19: warning: multi-character character constant [-Wmultichar]
   23 |     else if (S == 'THU')
      |                   ^~~~~
main.c:23:16: warning: comparison between pointer and integer
   23 |     else if (S == 'THU')
      |                ^~
main.c:27:19: warning: multi-character character constant [-Wmultichar]
   27 |     else if (S == 'FRI')
      |                   ^~~~~
main.c:27:16: warning: comparison between pointer and integer
   27 |     else if (S == 'FRI')
      |                ^~
main.c:31:19: warning: multi-character character constant [-Wmultichar]
   31 |     else if (S == 'SAT')
      |                   ^~~~~
main.c:31:16: warning: comparison between pointer and integer
   31 |     else if (S == 'SAT')
      |                ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
string S;
  cin>>S;
  if(S="SAT"){
  cout<<1<<endl;}
  else if(S="FRI"){
  cout<<2<<endl;}
  else if(S="THU"){
  cout<<3<<endl;}
  else if(S="WED"){
  cout<<4<<endl;}
  else if(S="TUE"){
  cout<<5<<endl;}
  else if(S="MON"){
  cout<<6<<endl;}
  else{
  cout<<7<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"SAT"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    7 |   if(S="SAT"){
      |      ~^~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
a.cc:9:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"FRI"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |   else if(S="FRI"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:11:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"THU"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |   else if(S="THU"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:13:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"WED"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   else if(S="WED"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:15:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"TUE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   else if(S="TUE"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
a.cc:17:12: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"MON"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |   else if(S="MON"){
      |           ~^~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package javaapplication7;
import java.util.Scanner;
public class JavaApplication7.java{{
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}
}


Compiler output:
Main.java:8: error: '{' expected
public class JavaApplication7.java{{
                             ^
Main.java:9: error: illegal start of expression
    public static void main(String[] args) {
    ^
Main.java:44: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package javaapplication7;
import java.util.Scanner;
public class JavaApplication7.java{
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: '{' expected
public class JavaApplication7.java{
                             ^
1 error
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package javaapplication7;
import java.util.Scanner;
public class JavaApplication7{
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: class JavaApplication7 is public, should be declared in a file named JavaApplication7.java
public class JavaApplication7{
       ^
1 error
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication7;
import java.util.Scanner;
public class JavaApplication7{
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: class JavaApplication7 is public, should be declared in a file named JavaApplication7.java
public class JavaApplication7{
       ^
1 error
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication7;
import java.util.Scanner;
private class JavaApplication7{
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: modifier private not allowed here
private class JavaApplication7{
        ^
1 error
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication7;
import java.util.Scanner;
public class JavaApplication7.java{ {
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: '{' expected
public class JavaApplication7.java{ {
                             ^
Main.java:9: error: illegal start of expression
    public static void main(String[] args) {
    ^
2 errors
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication7;
import java.util.Scanner;
public class JavaApplication7.java {
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: '{' expected
public class JavaApplication7.java {
                             ^
1 error
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication7;
import java.util.Scanner;
public class JavaApplication7 {
    public static void main(String[] args) {
        String day;
        Scanner input = new Scanner(System.in);
        day = input.nextLine();
        if(day.equals("MON")){
            System.out.println("6");
            System.out.println("It is Monday today, and six days later, it will be Sunday.");
        }
        else if(day.equals("TUE")){
            System.out.println("5");
            System.out.println("It is Tuesday today, and five days later, it will be Sunday.");
        }
        else if(day.equals("WED")){
            System.out.println("4");
            System.out.println("It is Wednesday today, and four days later, it will be Sunday.");
        }
        else if(day.equals("THU")){
            System.out.println("3");
            System.out.println("It is Thursday today, and three days later, it will be Sunday.");
        }
        else if(day.equals("FRI")){
            System.out.println("3");
            System.out.println("It is Friday today, and two days later, it will be Sunday.");
        }else if(day.equals("SAT")){
            System.out.println("1");
            System.out.println("It is Saturday today, and tomorrow will be Sunday.");
        }
        else if(day.equals("SUN")){
            System.out.println("7");
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        
    }
    
}


Compiler output:
Main.java:8: error: class JavaApplication7 is public, should be declared in a file named JavaApplication7.java
public class JavaApplication7 {
       ^
1 error
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(){
    string L[] = {"SUN","MON","TUE","WED","THU","FRI","SAT"}
    string s;
    cin >> s;
    rep(i,7){
        if(L[i] == s){
            cout << (7-i) << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'string'
    8 |     string s;
      |     ^~~~~~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
Language: C++

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

int main() {
	string s;
    cin >> s;
    vector<string> t={"SUN","MON","TUE","WED","THU","FRI","SAT"};
    for(int i=0;i<7;i++){
      if(s==t.at(i)){
        cout << 7-i << endl;
      }
}


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

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#define ll long long
const int MOD = 1e9+7;
using namespace std;


int main(){
	map<string, int> mp;
	mp.insert(make_pair("SUN", 7));
	mp.insert(make_pair("MON", 6));
	mp.insert(make_pair("TUE", 5));
	mp.insert(make_pair("EWD", 4));
	mp.insert(make_pair("THU", 3));
	mp.insert(make_pair("FRI", 2));
	mp.insert(make_pair("SAT", 1));
	string s;
	cin >> s;
	cout << m.at(s) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'm' was not declared in this scope
   25 |         cout << m.at(s) << endl;
      |                 ^
Language: C++

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

int sum(int n) {
  string S;
  cin >> S;
  
  if (S == "SUN") cout << 7 << endl;
  else if (S == "MON") cout << 6 << endl;
  else if (S == "TUE") cout << 5 << endl;
  else if (S == "WED") cout << 4 << endl;
  else if (S == "THU") cout << 3 << endl;
  else if (S == "FRI") cout << 2 << endl;
  else cout << 1 << endl;
  
}

Compiler output:
a.cc: In function 'int sum(int)':
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String S;
        S = sc.next();
        switch(S){
            case "SUN":
                System.out.println(7);
                break;
            case "MON":
                System.out.println(1);
                break;
            case "TUE":
                System.out.println(2);
                break;
            case "WED":
                System.out.println(3);
                break;
            case "THU":
                System.out.println(4);
                break;
            case "FRI":
                System.out.println(5);
                break;                
            case "SAT":
                System.out.println(6);
                break;                
        }
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~