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

<?php

list($s) = explode(" ", trim(fgets(STDIN)));

$days = ["SUN","MON","TUE","WED","THU","FRI","SAT"];

$a = array_search($s, $days);

echo 7 - $a;

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:5:1: error: '$days' does not name a type
    5 | $days = ["SUN","MON","TUE","WED","THU","FRI","SAT"];
      | ^~~~~
a.cc:7:1: error: '$a' does not name a type
    7 | $a = array_search($s, $days);
      | ^~
a.cc:9:1: error: 'echo' does not name a type
    9 | echo 7 - $a;
      | ^~~~
Language: C++

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

int main()
{
  string s;
  cin>>s;
  
  switch(s)
  {
    case "SUN":
      cout<<7<<endl;
    case "MON":
      cout<<6<<endl;   
    case "TUE":
      cout<<5<<endl;
    case "WED":
      cout<<4<<endl;
    case "THU":
      cout<<3<<endl;
    case "FRY":
      cout<<2<<endl;
    default
      cout<<1<<endl;
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: switch quantity not an integer
    9 |   switch(s)
      |          ^
a.cc:23:12: error: expected ':' before 'cout'
   23 |     default
      |            ^
      |            :
   24 |       cout<<1<<endl;
      |       ~~~~
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long A = sc.nextLong();
    long B = sc.nextLong();
    long X = sc.nextLong();
    
    if (A + B > X) {
      System.out.println(0);
    }
    for (int i = 0; i < 10000000000; i++) {
      int j = String.valueOf(i).length();    // 3が返される
      if (A * i + B * j > x) {
        i--;
        System.out.print(i);
        break;
      }
    }
  }
}

Compiler output:
Main.java:13: error: integer number too large
    for (int i = 0; i < 10000000000; i++) {
                        ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  map<string, int> day;
  day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
  string S; cin >> S;
  cout << day.at(S) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'SUN' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |       ^~~
a.cc:5:20: error: 'MON' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |                    ^~~
a.cc:5:33: error: 'TUE' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |                                 ^~~
a.cc:5:46: error: 'WED' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |                                              ^~~
a.cc:5:59: error: 'THU' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |                                                           ^~~
a.cc:5:72: error: 'FRI' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |                                                                        ^~~
a.cc:5:85: error: 'SAT' was not declared in this scope
    5 |   day[SUN] = 7,day[MON] = 6,day[TUE] = 5,day[WED] = 4,day[THU] = 3,day[FRI] = 2,day[SAT] = 1;
      |                                                                                     ^~~
Language: C++

#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <limits.h>
#include <cmath>
#include <queue>
#include <map>
#include <iomanip>
#include <random>
#include <fstream>
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.14159265358979323846
#define MOD 1000000007
#define vi vector<int>
using namespace std;
using ll = long long;

const int MAX = 1000000;

ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++){
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}

// 二項係数計算
long long COM(int n, int k){
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll gcd(ll a, ll b)
{
  ll r;
  while ((r = a % b))
  {
    a = b;
    b = r;
  }
  return b;
}

template <class T> struct cord{
  T x,y;
};

template <class T> double dist(cord<T> a, cord<T> b){
  T dx=a.x-b.x;
  T dy=a.y-b.y;
  return sqrt(dx*dx+dy*dy);
}

struct s{
  int p,i,r;
};

//比較関数（降順）
bool cmpP(const s &a, const s &b){
  return a.p > b.p;
}

//比較関数（昇順）
bool cmpI(const s &a, const s &b){
  return a.i < b.i;
}

int main()
{

  //cout << fixed << setprecision(10);

  string s;
  switch (s) {
    case "SUN":
    cout << 7;
    break;
    case "MON":
    cout << 6;
    break;
    case "TUE":
    cout << 5;
    break;
    case "WED":
    cout << 4;
    break;
    case "THU":
    cout << 3;
    break;
    case "FRI":
    cout << 2;
    break;
    case "SAT":
    cout << 1;
    break;
    default:
    break;
  }
  

  return 0;
}


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

import java.util.Scanner;
public class A
{
    public static void main(String[]args)
    {
        Scanner laptm = new Scanner(System.in);
        String s = laptm.next();
        if(s.equals("SAT"))
        System.out.println("1");
        if(s.equals("SUN"))
        System.out.println("7");
        if(s.equals("MON"))
        System.out.println("6");
        if(s.equals("TUE"))
         System.out.println("5");
        if(s.equals("WED"))
        System.out.println("4");
        if(s.equals("THU"))
         System.out.println("3");
        if(s.equals("FRI"))
        System.out.println("7");
    }
}    

Compiler output:
Main.java:2: error: class A is public, should be declared in a file named A.java
public class A
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  std::string s;
  cin >> s;
  if(s == "SAT"){
	cout << 1 << endl;
  } else if (s == "FRI"){
	cout << 2 << endl;
  } else if(s == "THU"){
	cour << 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;
  }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cour' was not declared in this scope
   11 |         cour << 3 << endl;
      |         ^~~~
Language: C

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

int main(){
  char s[4];

  scanf("%s", s);

  if(s[0] == 'S'){
    if(s[1] == 'U') printf("7\n");

    else printf("1\n");
  }

  else if(s[0] == 'M') printf("6\n");

  else if(s[0] == 'T'){
    if(s[1] == 'U') printf("5\n");

    else printf("3\n");
  }

  else if(s[0] == 'W') printf("4\n");

  else if(s[0] == 'F') printf("2\n");]

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:38: error: expected statement before ']' token
   27 |   else if(s[0] == 'F') printf("2\n");]
      |                                      ^
Language: C++

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  string N
  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:34:3: error: expected initializer before 'if'
   34 |   if (N=="SUN")
      |   ^~
a.cc:36:7: error: 'N' was not declared in this scope
   36 |   if (N=="MON")
      |       ^
a.cc:38:7: error: 'N' was not declared in this scope
   38 |   if (N=="TUE")
      |       ^
a.cc:40:7: error: 'N' was not declared in this scope
   40 |   if (N=="WED")
      |       ^
a.cc:42:7: error: 'N' was not declared in this scope
   42 |   if (N=="THU")
      |       ^
a.cc:44:7: error: 'N' was not declared in this scope
   44 |   if (N=="FRI")
      |       ^
a.cc:46:7: error: 'N' was not declared in this scope
   46 |   if (N=="SAT")
      |       ^
Language: C++

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

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'mamespace'
    5 | using mamespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string s;cin>>s;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   string s;cin>>s;
      |            ^~~
      |            std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:17: error: 's' was not declared in this scope
    7 |   string s;cin>>s;
      |                 ^
a.cc:8:3: error: 'map' was not declared in this scope
    8 |   map<string,int> mp;
      |   ^~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:8:14: error: expected primary-expression before 'int'
    8 |   map<string,int> mp;
      |              ^~~
a.cc:9:3: error: 'mp' was not declared in this scope
    9 |   mp["SUN"]=7;
      |   ^~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<mp[s]<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<mp[s]<<endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
#include<map>
#include<utility>
using mamespace std;
int main(){
  string s;cin>>s;
  map<string,int> mp;
  mp["SUN"]=7;
  mp["MON"]=6;
    mp["TUE"]=5;
    mp["WED"]=4;
    mp["THU"]=3;
    mp["FRI"]=2;
    mp["SUT"]=1;
  cout<<mp[s]<<endl;
  return 0;
}
    
  

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'mamespace'
    5 | using mamespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string s;cin>>s;
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   string s;cin>>s;
      |            ^~~
      |            std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:17: error: 's' was not declared in this scope
    7 |   string s;cin>>s;
      |                 ^
a.cc:8:3: error: 'map' was not declared in this scope
    8 |   map<string,int> mp;
      |   ^~~
a.cc:8:3: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:8:14: error: expected primary-expression before 'int'
    8 |   map<string,int> mp;
      |              ^~~
a.cc:9:3: error: 'mp' was not declared in this scope
    9 |   mp["SUN"]=7;
      |   ^~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<mp[s]<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<mp[s]<<endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string A
  
  if(A == "SUN"){
    cout << 7 << endl;
  }
  
  if(A == "MON"){
    cout << 6 << endl;
  }
  
  if(A == "TUE"){
    cout << 5 << endl;
  }
  
  if(A == "WED"){
    cout << 4 << endl;
  }
  
  if(A == "THU"){
    cout << 3 << endl;
  }
  
  if(A == "FRI"){
    cout << 2 << endl;
  }
  
  if(A == "SAT"){
    cout << 1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'if'
    7 |   if(A == "SUN"){
      |   ^~
a.cc:11:6: error: 'A' was not declared in this scope
   11 |   if(A == "MON"){
      |      ^
a.cc:15:6: error: 'A' was not declared in this scope
   15 |   if(A == "TUE"){
      |      ^
a.cc:19:6: error: 'A' was not declared in this scope
   19 |   if(A == "WED"){
      |      ^
a.cc:23:6: error: 'A' was not declared in this scope
   23 |   if(A == "THU"){
      |      ^
a.cc:27:6: error: 'A' was not declared in this scope
   27 |   if(A == "FRI"){
      |      ^
a.cc:31:6: error: 'A' was not declared in this scope
   31 |   if(A == "SAT"){
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string A
  cin >> A;
  
  if(A == "SUN"){
    cout << 7 << endl;
  }
  
  if(A == "MON"){
    cout << 6 << endl;
  }
  
  if(A == "TUE"){
    cout << 5 << endl;
  }
  
  if(A == "WED"){
    cout << 4 << endl;
  }
  
  if(A == "THU"){
    cout << 3 << endl;
  }
  
  if(A == "FRI"){
    cout << 2 << endl;
  }
  
  if(A == "SAT"){
    cout << 1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> A;
      |   ^~~
a.cc:8:6: error: 'A' was not declared in this scope
    8 |   if(A == "SUN"){
      |      ^
a.cc:12:6: error: 'A' was not declared in this scope
   12 |   if(A == "MON"){
      |      ^
a.cc:16:6: error: 'A' was not declared in this scope
   16 |   if(A == "TUE"){
      |      ^
a.cc:20:6: error: 'A' was not declared in this scope
   20 |   if(A == "WED"){
      |      ^
a.cc:24:6: error: 'A' was not declared in this scope
   24 |   if(A == "THU"){
      |      ^
a.cc:28:6: error: 'A' was not declared in this scope
   28 |   if(A == "FRI"){
      |      ^
a.cc:32:6: error: 'A' was not declared in this scope
   32 |   if(A == "SAT"){
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string A
  cin A;
  
  if(A == "SUN"){
    cout << 7 << endl;
  }
  
  if(A == "MON"){
    cout << 6 << endl;
  }
  
  if(A == "TUE"){
    cout << 5 << endl;
  }
  
  if(A == "WED"){
    cout << 4 << endl;
  }
  
  if(A == "THU"){
    cout << 3 << endl;
  }
  
  if(A == "FRI"){
    cout << 2 << endl;
  }
  
  if(A == "SAT"){
    cout << 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin A;
      |   ^~~
a.cc:8:6: error: 'A' was not declared in this scope
    8 |   if(A == "SUN"){
      |      ^
a.cc:12:6: error: 'A' was not declared in this scope
   12 |   if(A == "MON"){
      |      ^
a.cc:16:6: error: 'A' was not declared in this scope
   16 |   if(A == "TUE"){
      |      ^
a.cc:20:6: error: 'A' was not declared in this scope
   20 |   if(A == "WED"){
      |      ^
a.cc:24:6: error: 'A' was not declared in this scope
   24 |   if(A == "THU"){
      |      ^
a.cc:28:6: error: 'A' was not declared in this scope
   28 |   if(A == "FRI"){
      |      ^
a.cc:32:6: error: 'A' was not declared in this scope
   32 |   if(A == "SAT"){
      |      ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(s == "SUN"){
      |      ~~^~~~~~~~
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s == "MON"){
      |        ~~^~~~~~~~
a.cc:13:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(s == "TUE"){
      |      ~~^~~~~~~~
a.cc:16:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |   if(s == "WED"){
      |      ~~^~~~~~~~
a.cc:19:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |   if(s == "THU"){
      |      ~~^~~~~~~~
a.cc:22:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |   if(s == "FRI"){
      |      ~~^~~~~~~~
a.cc:25:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |   if(s == "SAT"){
      |      ~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int S; cin >> S;
  
  if(S == "SUN") cout << 7 << endl;
  if(S == "MON") cout << 6 << endl;
  if(S == "TUE") cout << 5 << endl;  
  if(S == "WED") cout << 4 << endl;  
  if(S == "THU") cout << 3 << endl;  
  if(S == "FRI") cout << 2 << endl;  
  if(S == "SAT") cout << 1 << endl; 

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(S == "SUN") cout << 7 << endl;
      |      ~~^~~~~~~~
a.cc:8:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(S == "MON") cout << 6 << endl;
      |      ~~^~~~~~~~
a.cc:9:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(S == "TUE") cout << 5 << endl;
      |      ~~^~~~~~~~
a.cc:10:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   if(S == "WED") cout << 4 << endl;
      |      ~~^~~~~~~~
a.cc:11:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   if(S == "THU") cout << 3 << endl;
      |      ~~^~~~~~~~
a.cc:12:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   if(S == "FRI") cout << 2 << endl;
      |      ~~^~~~~~~~
a.cc:13:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(S == "SAT") cout << 1 << endl;
      |      ~~^~~~~~~~
Language: C++

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string> week={"MON","TUE","WED","THU","FRI","SAT","SUN"}
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #include<string>
a.cc:6:16: error: expected primary-expression before '>' token
    6 |   vector<string> week={"MON","TUE","WED","THU","FRI","SAT","SUN"}
      |                ^
a.cc:6:18: error: 'week' was not declared in this scope
    6 |   vector<string> week={"MON","TUE","WED","THU","FRI","SAT","SUN"}
      |                  ^~~~
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s;
      |          ^
Language: C++

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'SUM' was not declared in this scope
    6 |         if(s==SUM){
      |               ^~~
a.cc:9:15: error: 'MON' was not declared in this scope
    9 |         if(s==MON){
      |               ^~~
a.cc:12:15: error: 'TUE' was not declared in this scope
   12 |         if(s==TUE){
      |               ^~~
a.cc:15:15: error: 'WED' was not declared in this scope
   15 |         if(s==WED){
      |               ^~~
a.cc:18:15: error: 'THU' was not declared in this scope
   18 |         if(s==THU){
      |               ^~~
a.cc:21:15: error: 'FRI' was not declared in this scope
   21 |         if(s==FRI){
      |               ^~~
a.cc:24:15: error: 'SAT' was not declared in this scope
   24 |         if(s==SAT){
      |               ^~~
Language: C++

#include<string>
#include<iostream>
#include <algorithm>
#include<vector>
#include<functional>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#define ll long long
using namespace std;



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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ';' before 'if'
   18 |   if(S=="SUN") ANS=7
      |                     ^
      |                     ;
   19 |   if(S=="MON") ANS=6
      |   ~~
Language: C++

#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int main()
{
  //string  a
  long long i,j,k,l,n,o;
  double m;
  //  cin>>a
  //size_t size =a.length();
  //cout<<"size:"<<size<<endl;
  cin >> i >> j >>k;
  l=1;
  m=1;
  while(m>=1.0 && l<=1000000000){
     //cout << l <<endl;
    n=(i*l+j*(floor(log10(l)+1)));
    o=k-n
    if(o>=0){
      m=k/n
      l=floor(l*m)+1;
    }
    else{
      m=0
    }
  }
  if(l>1000000000){
    l=1000000000;
  }
  else{
  l=l-1;
  }
  cout << l <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before 'if'
   19 |     o=k-n
      |          ^
      |          ;
   20 |     if(o>=0){
      |     ~~    
a.cc:24:5: error: 'else' without a previous 'if'
   24 |     else{
      |     ^~~~
a.cc:25:10: error: expected ';' before '}' token
   25 |       m=0
      |          ^
      |          ;
   26 |     }
      |     ~
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'SUN' was not declared in this scope
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                       ^~~
a.cc:8:27: error: 'MON' was not declared in this scope; did you mean 'MOD'?
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                           ^~~
      |                           MOD
a.cc:8:31: error: 'TUE' was not declared in this scope
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                               ^~~
a.cc:8:35: error: 'WED' was not declared in this scope
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                                   ^~~
a.cc:8:39: error: 'THU' was not declared in this scope
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                                       ^~~
a.cc:8:43: error: 'FRI' was not declared in this scope
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                                           ^~~
a.cc:8:47: error: 'SAT' was not declared in this scope
    8 |   vector<string> vec={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                                               ^~~
a.cc:8:50: error: could not convert '{<expression error>, <expression error>, <expression error>, <expression error>, <expression error>, <expression error>, <expression error>}' 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>
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ',' or ';' before '=' token
    8 |   vector<string> vec(7)={SUN,MON,TUE,WED,THU,FRI,SAT};
      |                        ^
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ',' or ';' before '{' token
    8 |   vector<string> vec(7){SUN,MON,TUE,WED,THU,FRI,SAT};
      |                        ^
Language: C++

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

using ll=long long;
const ll MOD=1000000007;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'SUN' was not declared in this scope
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                      ^~~
a.cc:8:26: error: 'MON' was not declared in this scope; did you mean 'MOD'?
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                          ^~~
      |                          MOD
a.cc:8:30: error: 'TUE' was not declared in this scope
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                              ^~~
a.cc:8:34: error: 'WED' was not declared in this scope
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                                  ^~~
a.cc:8:38: error: 'THU' was not declared in this scope
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                                      ^~~
a.cc:8:42: error: 'FRI' was not declared in this scope
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                                          ^~~
a.cc:8:46: error: 'SAT' was not declared in this scope
    8 |   vector<string> vec(SUN,MON,TUE,WED,THU,FRI,SAT);
      |                                              ^~~
Language: C++

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

int main(){
    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 if(S == "SAT"){
        cout << 1 << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'S'
    7 |     cin S;
      |        ^~
      |        ;
Language: C++

#include<iostream>
#include<map>

int main(){
int S;
std::cin >> S;

map<string, int> mp;
mp["SUN"]=7;
mp["MON"]=6;
mp["TUE"]=5;
mp["WED"]=4;
mp["THU"]=3;
mp["FRI"]=2;
mp["SAT"]=1;

std::cout<< mp[S]<< "\n";

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: 'map' was not declared in this scope
    8 | map<string, int> mp;
      | ^~~
a.cc:8:1: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:8:5: error: 'string' was not declared in this scope
    8 | map<string, int> mp;
      |     ^~~~~~
a.cc:8:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:13: error: expected primary-expression before 'int'
    8 | map<string, int> mp;
      |             ^~~
a.cc:9:1: error: 'mp' was not declared in this scope
    9 | mp["SUN"]=7;
      | ^~
Language: C++

//#include <iostream>
//#using namespace std;
 
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main(){
    string st;
    cin >> st;
    int ans = 0;
    if(st == "SUN") ans = 7;
    if(st == "MON") ans = 6;
    if(st == "TUE") ans = 5;
    if(st == "WED") ans = 4;
    if(st == "THU") ans = 3;
    if(st == "FRI") ans = 2;
    if(st == "SAT") ans = 1;
    cout << ans << endl;
    return 0;

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

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

#define ARRAY_SIZE 10
#define STRING_SIZE 10

int main()
{
	char inputA[5];
	int dayNumber = 0;
	char weekDays[ARRAY_SIZE][STRING_SIZE] =
	{
		"MON",
		"TUE",
		"WED",
		"THU",
		"FRI",
		"SAT",
		"SUN"
	};
	scanf("%s", &inputA);

	for (int i = 0; i < sizeof(weekDays); i++)
	{
		dayNumber++;
		if (strcmp(weekDays[i], inputA) == 0)
		{
			break;
		}
	}

	if (dayNumber == 7)
	{
		printf("7 \n");
		return 0;
	}

	printf("%d \n", 7 - dayNumber);
	return 0;
}

Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

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

#define ARRAY_SIZE 50
#define STRING_SIZE 10

void main()
{
	char inputA[100];
	int dayNumber = 0;
	char weekDays[ARRAY_SIZE][STRING_SIZE] =
	{
		"MON",
		"TUE",
		"WED",
		"THU",
		"FRI",
		"SAT",
		"SUN"
	};
	scanf("%s", &inputA);

	for (int i = 0; i < sizeof(weekDays); i++)
	{
		dayNumber++;
		if (strcmp(weekDays[i], inputA) == 0)
		{
			break;
		}
	}

	if (dayNumber == 7)
	{
		printf("7 \n");
		return;
	}

	printf("%d \n", 7 - dayNumber);
	return;
}

Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

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

#define ARRAY_SIZE 50
#define STRING_SIZE 10

void main()
{
	char inputA[100];
	int dayNumber = 0;
	char weekDays[ARRAY_SIZE][STRING_SIZE] =
	{
		"MON",
		"TUE",
		"WED",
		"THU",
		"FRI",
		"SAT",
		"SUN"
	};
	scanf("%s", &inputA);

	for (int i = 0; i < sizeof(weekDays); i++)
	{
		dayNumber++;
		if (strcmp(weekDays[i], inputA) == 0)
		{
			break;
		}
	}

	if (dayNumber == 7)
	{
		printf("7 \n");
		return;
	}

	printf("%d \n", 7 - dayNumber);
  
	return;
}

Compiler output:
main.c:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>

int main(){
    int s;
    scanf("%s",&s);
    if(s == "SUN")
      printf("%d\n",7);
    if(s == "MON")
      printf("%d\n",6);
    if(s == "TUE")
      printf("%d\n",5);
    if(s == "WED")
      printf("%d\n",4);
    if(s == "THU")
      printf("%d\n",3);
    if(s == "FRI")
      printf("%d\n",2);
    if(s == "SAT")
      printf("%d\n",1);  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     if(s == "SUN")
      |        ~~^~~~~~~~
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(s == "MON")
      |        ~~^~~~~~~~
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s == "TUE")
      |        ~~^~~~~~~~
a.cc:12:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(s == "WED")
      |        ~~^~~~~~~~
a.cc:14:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if(s == "THU")
      |        ~~^~~~~~~~
a.cc:16:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(s == "FRI")
      |        ~~^~~~~~~~
a.cc:18:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if(s == "SAT")
      |        ~~^~~~~~~~
Language: C++

S = input()

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)


Compiler output:
a.cc:3:9: warning: multi-character character constant [-Wmultichar]
    3 | if S == 'SUN':
      |         ^~~~~
a.cc:5:11: warning: multi-character character constant [-Wmultichar]
    5 | elif S == 'MON':
      |           ^~~~~
a.cc:7:11: warning: multi-character character constant [-Wmultichar]
    7 | elif S == 'TUE':
      |           ^~~~~
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 | elif S == 'WED':
      |           ^~~~~
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 | elif S == 'THU':
      |           ^~~~~
a.cc:13:11: warning: multi-character character constant [-Wmultichar]
   13 | elif S == 'FRI':
      |           ^~~~~
a.cc:15:11: warning: multi-character character constant [-Wmultichar]
   15 | elif S == 'SAT':
      |           ^~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = input()
      | ^
Language: C++

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

int32_t main()
{
  string str[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI" ,"SAT"};
	string a; cin>>a;
  int i;
  for( i = 0; i<n; i++)
  {
    if(str[i] == a) break;
  }
  	cout<< ( if(7 - i == 0) ? "7" : 7 -i );
return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:10:17: error: 'n' was not declared in this scope
   10 |   for( i = 0; i<n; i++)
      |                 ^
a.cc:14:18: error: expected primary-expression before 'if'
   14 |         cout<< ( if(7 - i == 0) ? "7" : 7 -i );
      |                  ^~
a.cc:14:17: error: expected ')' before 'if'
   14 |         cout<< ( if(7 - i == 0) ? "7" : 7 -i );
      |                ~^~~
      |                 )
Language: C++

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

int32_t main()
{
  string str[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI" ,"SAT"};
	string a; cin>>a;
  int i;
  for( i = 0; i<n; i++)
  {
    if(str[i] == a) break;
  }
  	cout<< ( 7 - i == 0 ? "7" : 7 -i );
return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:10:17: error: 'n' was not declared in this scope
   10 |   for( i = 0; i<n; i++)
      |                 ^
a.cc:14:29: error: operands to '?:' have different types 'const char*' and 'long long int'
   14 |         cout<< ( 7 - i == 0 ? "7" : 7 -i );
      |                  ~~~~~~~~~~~^~~~~~~~~~~~
Language: C++

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

int32_t main()
{
  string str[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI" ,"SAT"};
	string a; cin>>a;
  int i;
  for( i = 0; i<n; i++)
  {
    if(str[i] == a) break;
  }
  	cout<< ( 7 - i == 0 ? "0" : 7 -i );
return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:10:17: error: 'n' was not declared in this scope
   10 |   for( i = 0; i<n; i++)
      |                 ^
a.cc:14:29: error: operands to '?:' have different types 'const char*' and 'long long int'
   14 |         cout<< ( 7 - i == 0 ? "0" : 7 -i );
      |                  ~~~~~~~~~~~^~~~~~~~~~~~
Language: C++

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

int main(){
  string a;
  cin >> a;
  switch (a){
    case "SUN":
      cout << "7\n";
      break;
    case "MON":
      cout << "6\n";
      break;
    case "TUE":
      cout << "5\n";
      break;
    case "WED":
      cout << "4\n";
      break;
    case "THU":
      cout << "3\n";
      break;
    case "FRI":
      cout << "2\n";
      break;
    case "SAT":
      cout << "1\n";
      break;
    default:
      break;
  }
  return 0;
}


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

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

int main(){
  string a;
  cin >> a;
  switch (a){
    case "SUN":
      cout << "7\n";
      break;
    case "MON":
      cout << "6\n";
      break;
    case "TUE":
      cout << "5\n";
      break;
    case "WED":
      cout << "4\n";
      break;
    case "THU":
      cout << "3\n";
      break;
    case "FRI":
      cout << "2\n";
      break;
    case "SAT":
      cout << "1\n";
      break;
  }
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  int A;
  cin >> S;
  if(S == SUN)A = 7;
  if(S == SAt)A = 1;
  if(S == MON)A = 6;
  if(S == TUE)A = 5;
  if(S == WED)A = 4;
  if(S == THU)A = 3;
  if(S == FRI)A = 2;
  
  cout << A << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'SUN' was not declared in this scope
    8 |   if(S == SUN)A = 7;
      |           ^~~
a.cc:9:11: error: 'SAt' was not declared in this scope
    9 |   if(S == SAt)A = 1;
      |           ^~~
a.cc:10:11: error: 'MON' was not declared in this scope
   10 |   if(S == MON)A = 6;
      |           ^~~
a.cc:11:11: error: 'TUE' was not declared in this scope
   11 |   if(S == TUE)A = 5;
      |           ^~~
a.cc:12:11: error: 'WED' was not declared in this scope
   12 |   if(S == WED)A = 4;
      |           ^~~
a.cc:13:11: error: 'THU' was not declared in this scope
   13 |   if(S == THU)A = 3;
      |           ^~~
a.cc:14:11: error: 'FRI' was not declared in this scope
   14 |   if(S == FRI)A = 2;
      |           ^~~
Language: C++

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

int main(){
  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 if(S == SAT){
    cout << "1" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'SUN' was not declared in this scope
    7 |   if(S == SUN){
      |           ^~~
a.cc:10:16: error: 'MON' was not declared in this scope
   10 |   else if(S == MON){
      |                ^~~
a.cc:13:16: error: 'TUE' was not declared in this scope
   13 |   else if(S == TUE){
      |                ^~~
a.cc:16:16: error: 'WED' was not declared in this scope
   16 |   else if(S == WED){
      |                ^~~
a.cc:19:16: error: 'THU' was not declared in this scope
   19 |   else if(S == THU){
      |                ^~~
a.cc:22:16: error: 'FRI' was not declared in this scope
   22 |   else if(S == FRI){
      |                ^~~
a.cc:25:16: error: 'SAT' was not declared in this scope
   25 |   else if(S == SAT){
      |                ^~~
Language: C++

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

int main()
{
    string s;
    cin>>s;
    if(s == "SUN")
        cout<<"7";
    else if(s == "MON")
        cout<<"6";
    else if(s == "TUES")
        cout<<"5";
    else if(s == "WED")
        cout<<"4";
    else if(s == "THUS")
        cout<<"3";
    else if(s == "FRI")
        cout<<"2";
    else Sif(s == "SAT")
        cout<<"1";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:10: error: 'Sif' was not declared in this scope
   20 |     else Sif(s == "SAT")
      |          ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ';' before 'cout'
   19 | else("SAT" == S)
      |                 ^
      |                 ;
   20 |     cout << 1 << endl;
      |     ~~~~         
a.cc:19:12: warning: ignoring return value of 'bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   19 | else("SAT" == S)
      |     ~~~~~~~^~~~~
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:3819:5: note: declared here
 3819 |     operator==(const _CharT* __lhs,
      |     ^~~~~~~~
Language: C++

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

using namespace std;

int main() {
  string s;
  cin >> s;
  vector<string> dow = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN" };
  
  auto it = find(dow.begin(), dow.end(), s);
  ++it;
  cout << *it;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<string> dow = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN" };
      |   ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include <iostream>
  +++ |+#include <vector>
    5 | 
a.cc:11:16: error: expected primary-expression before '>' token
   11 |   vector<string> dow = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN" };
      |                ^
a.cc:11:18: error: 'dow' was not declared in this scope
   11 |   vector<string> dow = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN" };
      |                  ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  atring s; cin >> s;
  if (s=="SUN"){
    cout << 7 << endl;
  }
  if (s=="MON"){
    cout << 6 << endl;
  }
  if (s=="TUE"){
    cout << 5 << endl;
  }
  if (s=="WED"){
    cout << 4 << endl;
  }
  if (s=="THU"){
    cout << 3 << endl;
  }
  if (s=="FRI"){
    cout << 2 << endl;
  }
  if (s=="SAT"){
    cout << 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'atring' was not declared in this scope
    4 |   atring s; cin >> s;
      |   ^~~~~~
a.cc:4:20: error: 's' was not declared in this scope
    4 |   atring s; cin >> s;
      |                    ^