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

#include <cmath>
#include<iostream>
#include <functional>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <iomanip>
using namespace std;
 
int main(){    
  string S;
  cin >> S;

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


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

#include<bits/stdc++.h>
using namespace std;
int main(){
    string 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:19:23: error: expected '}' at end of input
   19 |     cout << 1 << endl;
      |                       ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <vector>

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

	std::vector<std::string> week = {
		"SAT",
		"FRI",
		"THU",
		"WED",
		"TUE",
		"MON",
		"SUN",
	};

	auto i = std::find(std::begin(week), std::end(week), S) - std::begin(week) + 1;

	std::cout << i << std::endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   20 |         auto i = std::find(std::begin(week), std::end(week), S) - std::begin(week) + 1;
      |                  ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:20:27: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   20 |         auto i = std::find(std::begin(week), std::end(week), S) - std::begin(week) + 1;
      |                  ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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


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

#include <iostream>
#include <math.h>

using namespace std;

int main(void)
{
    long long int sum=0,range=0,a=0,b=0;
    double ans=0.0,half;
    long long int m,n,o,i,j,k=0;
    long long int longnum[200005];
    //vector <int> v;
    //float f,g,h;
    char c,d;
    string s;
    cin>>s;
    switch (s)
    {
    case "SUN\0":
        cout<<7;
    case "MON\0":
        cout<<6;
    case "TUE\0":
        cout<<5;
    case "WED\0":
        cout<<4;
    case "THU\0":
        cout<<3;
    case "FRI\0":
        cout<<2;
    case "SAT\0":
        cout<<1;
    }
    return 0;
}




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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String day = sc.nextLine();

		switch(day) {
		case "MON":
			System.out.println(6);
			break;
		case "TUE":
			System.out.println(5);
			break;
		case "WED":
			System.out.println(4);
			break;
		case "THU":
			System.out.println(3);
			break;
		case "FRI":
			System.out.println(2);
			break;
		case "SAT":
			System.out.println(1);
			break;
		case "SUN":
			System.out.println(7);
			break;
		}
		
		sc.close();

	}



Compiler output:
Main.java:36: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected unqualified-id before '>>' token
    4 | string >> txt;
      |        ^~
a.cc:5:10: error: 'txt' was not declared in this scope
    5 |   cin >> txt;
      |          ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
string S;
cin>>S;
string A[7]={"MON","TUE","WED","THU","FRI","SAT","SUN"};
for(int i=0;i<7;i++){
  if(S==A[1]){
  cout<<i+1<<endl;  
  }
  
}

return 0;

Compiler output:
a.cc:5:1: error: 'cin' does not name a type
    5 | cin>>S;
      | ^~~
a.cc:7:1: error: expected unqualified-id before 'for'
    7 | for(int i=0;i<7;i++){
      | ^~~
a.cc:7:13: error: 'i' does not name a type
    7 | for(int i=0;i<7;i++){
      |             ^
a.cc:7:17: error: 'i' does not name a type
    7 | for(int i=0;i<7;i++){
      |                 ^
a.cc:14:1: error: expected unqualified-id before 'return'
   14 | return 0;
      | ^~~~~~
Language: C++

include <bits/std++.h>
using namespace std;
int main() {
	char c1, c2;
    cin >> c1 >> c2;
    if (c1=='M')
      	cout << 6;
    if (c1=='T' && c2=='U')
      	cout << 5;
    if (c1=='W')
      	cout << 4;
    if (c1=='T' && c2=='H')
      	cout << 3;
    if (c1=='F')
      	cout << 2;
    if (c1=='S' && c2=='A')
      	cout << 1;
    if (c1=='S' && c2=='U')
      	cout << 7;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/std++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> c1 >> c2;
      |     ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << 6;
      |         ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << 5;
      |         ^~~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << 4;
      |         ^~~~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << 3;
      |         ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << 2;
      |         ^~~~
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << 1;
      |         ^~~~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout << 7;
      |         ^~~~
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<cstring>
#include<vector>
#include<stack>
#include<bitset>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<map>
#include<queue>
using namespace std;
string s
int main()
{
	cin >> s;
	if(s == "SUN"){
		printf("%d", 7);
	}else if(s == "SAT"){
		printf("1");
	}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");
	}
	return 0;
}

Compiler output:
a.cc:18:1: error: expected initializer before 'int'
   18 | int main()
      | ^~~
Language: C++

#include<bits/stdc++.h>
#define ios ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std ;
typedef long long int ll ;


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



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

a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
s = input()
print(7 - a.index(s))

Compiler output:
a.cc:1:7: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |       ^~~~~
a.cc:1:13: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |             ^~~~~
a.cc:1:19: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                   ^~~~~
a.cc:1:25: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                         ^~~~~
a.cc:1:31: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                               ^~~~~
a.cc:1:37: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                                     ^~~~~
a.cc:1:43: warning: multi-character character constant [-Wmultichar]
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      |                                           ^~~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
      | ^
Language: C++

#include <iostream>
#include <math.h>

using namespace std;

int main(void)
{
    long long int sum=0,range=0,a=0,b=0;
    double ans=0.0,half;
    long long int m,n,o,i,j,k=0;
    long long int longnum[200005];
    //vector <int> v;
    //float f,g,h;
    char c,d;
    string s;
    cin>>s;
    switch (s)
    {
    case "SUN":
        cout<<7;
    case "MON":
        cout<<6;
    case "TUE":
        cout<<5;
    case "WED":
        cout<<4;
    case "THU":
        cout<<3;
    case "FRI":
        cout<<2;
    case "SAT":
        cout<<1;
    }
    return 0;
}




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

#include<bits/stdc++.h>
#define int long long
using namespace std;
constexpr int mod=1e9+7;
signed main(){
    map<string,int>m={{"SUN",7},{"MON",6},{"TUE",5},{"WED",4},{"THU,3"},{"FRI",2},{"SAT",1}};
    string s;
    cin>>s;
    cout<<m[s]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:92: error: could not convert '{{"SUN", 7}, {"MON", 6}, {"TUE", 5}, {"WED", 4}, {"THU,3"}, {"FRI", 2}, {"SAT", 1}}' from '<brace-enclosed initializer list>' to 'std::map<std::__cxx11::basic_string<char>, long long int>'
    6 |     map<string,int>m={{"SUN",7},{"MON",6},{"TUE",5},{"WED",4},{"THU,3"},{"FRI",2},{"SAT",1}};
      |                                                                                            ^
      |                                                                                            |
      |                                                                                            <brace-enclosed initializer list>
Language: C++

///Mn kotr el labawy mb2t4 nawy
#include<bits/stdc++.h>

#define ll long long
using namespace std;
const int N = 2e5 + 5;
const int MOD =  998244353;
int get(string S){
  if(s == "SUN")return 0;
  if(s == "SAT")return 6;
  if(s == "FRI")return 5;
  if(s == "THU")return 4;
  if(s == "WED")return 3;
  if(s == "TUE")return 2;
  if(s == "MON")return 1;
}
int main(){
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  string s;
  cin >> s;
  cout << 7 - get(s) << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int get(std::string)':
a.cc:9:6: error: 's' was not declared in this scope
    9 |   if(s == "SUN")return 0;
      |      ^
a.cc:10:6: error: 's' was not declared in this scope
   10 |   if(s == "SAT")return 6;
      |      ^
a.cc:11:6: error: 's' was not declared in this scope
   11 |   if(s == "FRI")return 5;
      |      ^
a.cc:12:6: error: 's' was not declared in this scope
   12 |   if(s == "THU")return 4;
      |      ^
a.cc:13:6: error: 's' was not declared in this scope
   13 |   if(s == "WED")return 3;
      |      ^
a.cc:14:6: error: 's' was not declared in this scope
   14 |   if(s == "TUE")return 2;
      |      ^
a.cc:15:6: error: 's' was not declared in this scope
   15 |   if(s == "MON")return 1;
      |      ^
a.cc:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair <int, int>
#define pll pair <ll, ll>
#pragma 03
using namespace std;
string s[7] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
int main(){ 
	string a;
	cin >> a;
	for (int i = 0; i<7; i++){
		if (a == s[i]) cout << 7 - i << endl;SUN
	}
    return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:13:54: error: 'SUN' was not declared in this scope
   13 |                 if (a == s[i]) cout << 7 - i << endl;SUN
      |                                                      ^~~
Language: C++

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

int main( void ) {
  string s1;
  int day

  cin >> s1;

  if(s1=="SUN") day = 7;
  if(s1=="MON") day = 6;
  if(s1=="TUE") day = 5;
  if(s1=="WED") day = 4;
  if(s1=="THU") day = 3;
  if(s1=="FRY") day = 2;
  if(s1=="SAT") day = 1;

  cout << day << endl;

  return ( 0 );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'cin'
    9 |   cin >> s1;
      |   ^~~
a.cc:11:17: error: 'day' was not declared in this scope
   11 |   if(s1=="SUN") day = 7;
      |                 ^~~
a.cc:12:17: error: 'day' was not declared in this scope
   12 |   if(s1=="MON") day = 6;
      |                 ^~~
a.cc:13:17: error: 'day' was not declared in this scope
   13 |   if(s1=="TUE") day = 5;
      |                 ^~~
a.cc:14:17: error: 'day' was not declared in this scope
   14 |   if(s1=="WED") day = 4;
      |                 ^~~
a.cc:15:17: error: 'day' was not declared in this scope
   15 |   if(s1=="THU") day = 3;
      |                 ^~~
a.cc:16:17: error: 'day' was not declared in this scope
   16 |   if(s1=="FRY") day = 2;
      |                 ^~~
a.cc:17:17: error: 'day' was not declared in this scope
   17 |   if(s1=="SAT") day = 1;
      |                 ^~~
a.cc:19:11: error: 'day' was not declared in this scope
   19 |   cout << day << endl;
      |           ^~~
Language: C++


#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <ios>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <forward_list>
#include <random>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <unordered_map>
#include <unordered_set>
#endif

#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define lcm( a, b ) (a)/__gcd((a),(b))*(b)
#define endl '\n'

using namespace std;

typedef long long LL;
typedef pair< int, int > P;
typedef pair< LL, LL > LP;
typedef pair< int, P > iP;
typedef pair< P, P > PP;

static const int INF = INT_MAX;
static const LL LINF = LLONG_MAX;
static const int MIN = INT_MIN;
static const LL LMIN = LLONG_MIN;
static const int MOD = 1000000007;
static const int SIZE = 200005;

const int dx[] = {0, -1, 1, 0};
const int dy[] = {-1, 0, 0, 1};

vector< int > Div( int n ) {
    vector< int > ret;
    for( int i = 1; i * i <= n; ++i ) {
        if( n % i == 0 ) {
            ret.pb( i );

            if( i * i != n ) ret.pb( n / i );
        }
    }
    sort( all( ret ) );
    return ret;
}

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

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



Compiler output:
a.cc:57:24: error: 'INT_MAX' was not declared in this scope
   57 | static const int INF = INT_MAX;
      |                        ^~~~~~~
a.cc:39:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   38 | #include <unordered_set>
  +++ |+#include <climits>
   39 | #endif
a.cc:58:24: error: 'LLONG_MAX' was not declared in this scope
   58 | static const LL LINF = LLONG_MAX;
      |                        ^~~~~~~~~
a.cc:58:24: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
a.cc:59:24: error: 'INT_MIN' was not declared in this scope
   59 | static const int MIN = INT_MIN;
      |                        ^~~~~~~
a.cc:59:24: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
a.cc:60:24: error: 'LLONG_MIN' was not declared in this scope
   60 | static const LL LMIN = LLONG_MIN;
      |                        ^~~~~~~~~
a.cc:60:24: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <iostream>
#include <vector>
#include <string>

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 {
		cout << 1 << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'S' was not declared in this scope
   11 |         if (S == "SUN") {
      |             ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long ll
typedef pair<int,int> Paint;

__attribute__((constructor))
void initial() {
 cin.tie(0);
 ios::sync_with_stdio(false);
}
int main(){
  //cout << fixed << setprecision(n)

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

}

Compiler output:
a.cc:8:1: error: expected initializer before 'typedef'
    8 | typedef pair<int,int> Paint;
      | ^~~~~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int ans = 0;
    if(str = "SUN"){
      ans = 7;
    }else if(str = "MON"){
      ans = 6;
    }else if(str = "TUE"){
      ans = 5;
    }else if(str = "WED"){
      ans = 4;
    }else if(str = "THU"){
      ans = 3;
    }else if(str = "FRI"){
      ans = 2;
    }else if(str = "SAT"){
      ans = 1;
    }
    System.out.println(ans);
  }
}
    
    

Compiler output:
Main.java:8: error: incompatible types: String cannot be converted to boolean
    if(str = "SUN"){
           ^
Main.java:10: error: incompatible types: String cannot be converted to boolean
    }else if(str = "MON"){
                 ^
Main.java:12: error: incompatible types: String cannot be converted to boolean
    }else if(str = "TUE"){
                 ^
Main.java:14: error: incompatible types: String cannot be converted to boolean
    }else if(str = "WED"){
                 ^
Main.java:16: error: incompatible types: String cannot be converted to boolean
    }else if(str = "THU"){
                 ^
Main.java:18: error: incompatible types: String cannot be converted to boolean
    }else if(str = "FRI"){
                 ^
Main.java:20: error: incompatible types: String cannot be converted to boolean
    }else if(str = "SAT"){
                 ^
7 errors
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<queue>
#define ll long long
#define itn int
#define co(ans) cout<<ans<<endl;
#define COYE cout<<"YES"<<endl;
#define COYe cout<<"Yes"<<endl;
#define COye cout<<"yes"<<endl;
#define CONO cout<<"NO"<<endl;
#define CONo cout<<"No"<<endl;
#define COno cout<<"no"<<endl;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,1,n)
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
using namespace std;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:36:3: error: 'else' without a previous 'if'
   36 |   else if(S=="MON") co(6);
      |   ^~~~
a.cc:37:3: error: 'else' without a previous 'if'
   37 |   else if(S=="TUE") co(5);
      |   ^~~~
a.cc:38:3: error: 'else' without a previous 'if'
   38 |   else if(S=="WED") co(4);
      |   ^~~~
a.cc:39:3: error: 'else' without a previous 'if'
   39 |   else if(S=="THU") co(3);
      |   ^~~~
a.cc:40:3: error: 'else' without a previous 'if'
   40 |   else if(S=="FRI") co(2);
      |   ^~~~
a.cc:41:3: error: 'else' without a previous 'if'
   41 |   else if(S=="SAT") co(1);
      |   ^~~~
Language: C++

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

int main( void ) {
  string s1;
  int day

  cin >> s1;

  if(s1=="SUN") day = 7;
  if(s1=="MON") day = 6;
  if(s1=="TUE") day = 5;
  if(s1=="WED") day = 4;
  if(s1=="THU") day = 3;
  if(s1=="FRY") day = 2;
  if(s1=="SAT") day = 1;

  cout << day; << endl;

  return ( 0 );
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'cin'
    9 |   cin >> s1;
      |   ^~~
a.cc:11:17: error: 'day' was not declared in this scope
   11 |   if(s1=="SUN") day = 7;
      |                 ^~~
a.cc:12:17: error: 'day' was not declared in this scope
   12 |   if(s1=="MON") day = 6;
      |                 ^~~
a.cc:13:17: error: 'day' was not declared in this scope
   13 |   if(s1=="TUE") day = 5;
      |                 ^~~
a.cc:14:17: error: 'day' was not declared in this scope
   14 |   if(s1=="WED") day = 4;
      |                 ^~~
a.cc:15:17: error: 'day' was not declared in this scope
   15 |   if(s1=="THU") day = 3;
      |                 ^~~
a.cc:16:17: error: 'day' was not declared in this scope
   16 |   if(s1=="FRY") day = 2;
      |                 ^~~
a.cc:17:17: error: 'day' was not declared in this scope
   17 |   if(s1=="SAT") day = 1;
      |                 ^~~
a.cc:19:11: error: 'day' was not declared in this scope
   19 |   cout << day; << endl;
      |           ^~~
a.cc:19:16: error: expected primary-expression before '<<' token
   19 |   cout << day; << endl;
      |                ^~
Language: C++

#include <bits/stdc++.h>
//For ordered_set
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define MOD 1000000007
#define test int t; cin>>t; while(t--)
#define init(arr,val) memset(arr,val,sizeof(arr))
#define loop(i,a,b) for(int i=a;i<b;i++)
#define loopr(i,a,b) for(int i=a;i>=b;i--)
#define loops(i,a,b,step) for(int i=a;i<b;i+=step)
#define looprs(i,a,b,step) for(int i=a;i>=b;i-=step)
#define ull unsigned long long int
#define ll long long int
#define P pair
#define PLL pair<long long, long long>
#define PII pair<int, int>
#define PUU pair<unsigned long long int, unsigned long long int>
#define L list
#define V vector
#define D deque
#define ST set
#define MS multiset
#define M map
#define UM unordered_map
#define mp make_pair
#define pb push_back
#define pf push_front
#define MM multimap
#define F first
#define S second
#define IT iterator
#define RIT reverse_iterator
#define FAST ios_base::sync_with_stdio(false);cin.tie();cout.tie();
#define FILE_READ_IN freopen("input.txt","r",stdin);
#define FILE_READ_OUT freopen("output.txt","w",stdout);
#define all(a) a.begin(),a.end()
#define ld long double
using namespace std;
// For ordered_set
using namespace __gnu_pbds;
template <typename T>
using ord_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
const ll maxn = 1e5;
const ll inf = 1e9;
const double pi = acos(-1);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: switch quantity not an integer
   50 |   switch(s){
      |          ^
a.cc:51:14: error: expected ';' before ':' token
   51 |         "MON" : cout << 6; return 0;
      |              ^~
      |              ;
a.cc:52:14: error: expected ';' before ':' token
   52 |         "TUE" : cout << 5; return 0;
      |              ^~
      |              ;
a.cc:53:14: error: expected ';' before ':' token
   53 |         "WED" : cout << 4; return 0;
      |              ^~
      |              ;
a.cc:54:14: error: expected ';' before ':' token
   54 |         "THU" : cout << 3; return 0;
      |              ^~
      |              ;
a.cc:55:14: error: expected ';' before ':' token
   55 |         "FRI" : cout << 2; return 0;
      |              ^~
      |              ;
a.cc:56:14: error: expected ';' before ':' token
   56 |         "SAT" : cout << 1; return 0;
      |              ^~
      |              ;
a.cc:57:14: error: expected ';' before ':' token
   57 |         "SUN" : cout << 7; return 0;
      |              ^~
      |              ;
Language: C++

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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORd(i, a, b) for (int i = (a) ; i >= (b); i--)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define sp system("pause")
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9;
const ll LINF = (ll) 1e18;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;

void TimeExecution() {
    cout << "\n\n===>> Time Execution: " << clock() / (double)1000 << " sec(s).";
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    /*
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif
    */
    string s;
    cin >> s;
    if(s == "SUN") cout << 7;
    if(s == "MON") cout << 6;
    if(s == "TUE") cout << 5;
    if(s == "WED") cout << 4;
    if(s == "THU") cout << 3;
    if(S == "FRI") cout << 2;
    if(s == "SAT") cout << 1;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:8: error: 'S' was not declared in this scope
   53 |     if(S == "FRI") cout << 2;
      |        ^
Language: C++

#include<iostream>  
  using namespace std;  
  
  int main(){  
      string S;  
      int N;  
      cin >> S >> N;  
      auto size = S.size();  
      for(int i = 0; i < size; i++){  
          S[i] += N;  
          if(S[i] > 'Z') cout << 'A' + (s[i] - 'Z');  
          else cout << S[i];  
      }  
      cout << endl;  
      return 0;  
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:41: error: 's' was not declared in this scope
   11 |           if(S[i] > 'Z') cout << 'A' + (s[i] - 'Z');
      |                                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll  long long;
int main() {
  ll a;
  cin>>a;
  vector<char>vec(a);
  for(ll i=0;i<a;i++){
    cin>>vec.at(i);
    if(vec.at(i)=='z')
      vec.at(i)='a';
    else
      vec.at(i)+=1;
  }
  for(ll i=0;i<a;i++){
    cout<<vec.at(i);
  }
  return 0;
}
     


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'll'
    3 | using ll  long long;
      |       ^~
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll a;
      |   ^~
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   cin>>a;
      |        ^
a.cc:8:9: error: expected ';' before 'i'
    8 |   for(ll i=0;i<a;i++){
      |         ^~
      |         ;
a.cc:8:14: error: 'i' was not declared in this scope
    8 |   for(ll i=0;i<a;i++){
      |              ^
a.cc:15:9: error: expected ';' before 'i'
   15 |   for(ll i=0;i<a;i++){
      |         ^~
      |         ;
a.cc:15:14: error: 'i' was not declared in this scope
   15 |   for(ll i=0;i<a;i++){
      |              ^
Language: Java

private static void rotALL(String input) {
//Loop 25 times, starting with ROT-1 and ending at ROT-25 (every possibliity besides the original input)
    for (int i = 1; i < 26; i++) {
        int rot = 26 - i;
        System.out.print("ROT" + rot + ": ");    
        for (int charIndex = 0; charIndex < input.length(); charIndex++) {
            char c = input.charAt(charIndex);

            int inta = 97; //a in the ASCII table
            int intaWithRot = inta + rot;
            int intA = 65; //A in the ASCII table
            int intAWithRot = intA + rot;

            int intaWithRotPlusOne = intaWithRot + 1;
            int intaWithRotPlusi = intaWithRot + i;
            int intAWithRotPlusOne = intAWithRot + 1;
            int intAWithRotPlusi = intAWithRot + i;

            if (c >= inta && c <= intaWithRot) {
                c += rot;
           } else if (c >= intA && c <= intAWithRot) {
                c += rot;
            } else if (c >= intaWithRotPlusOne && c <= intaWithRotPlusi) {
                c -= rot;
            } else if (c >= intAWithRotPlusOne && c <= intAWithRotPlusi) {
                c -= rot;
            }
            System.out.print(c);
        }
        System.out.println();

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
private static void rotALL(String input) {
               ^
  (use --enable-preview to enable unnamed classes)
Main.java:30: error: reached end of file while parsing
        System.out.println();
                             ^
2 errors
Language: C

#include<stdio.h>
int main()
{
    int A,B,C,water1,water2;
    scanf("%d %d %d",&A,&B,&C);
    water1=A-B;
    water2=C-water1;
    if(water2>=1&&water2<=20)
    {
       printf("%d",water2);
    }
    else
        printf("o");

    getch();

}


Compiler output:
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   15 |     getch();
      |     ^~~~~
      |     getc
Language: C++

#include "pch.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
	int n;
	string s;
	cin >> n >> s;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] + n > 90) {
			s[i] = s[i] - 26;
		}
		s[i] = s[i] + n;
	}
	cout << s << endl;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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


int main()
{
     int n;
     cin>>n;
     string d;
     cin>>d;
    for(int i=0;i<strlen(d);i++)
    {
      int x=int(x)-65;
      x=(x+n)%26;
      d[i]=(char)(65+x);
    }
  cout<<d<<endl;
     

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   12 |     for(int i=0;i<strlen(d);i++)
      |                          ^
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include <iostream>
using namespace std;


int main()
{
     int n;
     cin>>n;
     string d;
     cin>>d;
    for(int i=0;i<strlen(d);i++)
    {
      int x=int(x)-65;
      x=(x+n)%26;
      d[i]=(char)(65+x);
    }
  cout<<d<<endl;
     

    return 0;
}


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

include <iostream>
using namespace std;


int main()
{
     int n;
     cin>>n;
     string d;
     cin>>d;
    for(int i=0;i<d.size();i++)
    {
      int x=x-'A';
      x=(x+n)%25;
      d[i]=(char)('A'+x);
    }
  cout<<d;
     

    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:6: error: 'cin' was not declared in this scope
    8 |      cin>>n;
      |      ^~~
a.cc:9:6: error: 'string' was not declared in this scope
    9 |      string d;
      |      ^~~~~~
a.cc:10:11: error: 'd' was not declared in this scope
   10 |      cin>>d;
      |           ^
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout<<d;
      |   ^~~~
Language: C++

include <iostream>
using namespace std;


int main()
{
     int n;
     cin>>n;
     string d;
     cin>>d;
     for(int i=0;i<n;i++)
     {
         int p=(int)d[i] + n;
         if(p<=90)
         {
         d[i]=(char)p;
         }
         else if(p>90)
         {
             p=p-90+64;
             d[i]=(char)p;
         }
     }
     cout<<d;
     

    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:6: error: 'cin' was not declared in this scope
    8 |      cin>>n;
      |      ^~~
a.cc:9:6: error: 'string' was not declared in this scope
    9 |      string d;
      |      ^~~~~~
a.cc:10:11: error: 'd' was not declared in this scope
   10 |      cin>>d;
      |           ^
a.cc:24:6: error: 'cout' was not declared in this scope
   24 |      cout<<d;
      |      ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
  string s;
  int n;
  cin>>n>>s;
  for(int i=0;i<s.size();i++){
    s[i]+=n;
    if(s[i]>'Z'){
      s[i]=s[i]-'Z'1'A'-1;
    }
    cout<<s[i];
  }
  return 0;
}

Compiler output:
a.cc:10:20: error: digit separator outside digit sequence
   10 |       s[i]=s[i]-'Z'1'A'-1;
      |                    ^~~
a.cc:10:23: warning: missing terminating ' character
   10 |       s[i]=s[i]-'Z'1'A'-1;
      |                       ^
a.cc:10:23: error: missing terminating ' character
   10 |       s[i]=s[i]-'Z'1'A'-1;
      |                       ^~~~
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before numeric constant
   10 |       s[i]=s[i]-'Z'1'A'-1;
      |                    ^~~
      |                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0; i<int(n); i++)
int main() {
    int N;
    cin>>N;
    string S;
    cin>>S;
    for(int i=0; i<S.size(); i++){
        int num=s[i]-'A';
    num=(num+n)%26;
    s[i]=num+'A';
    cout << s[i];
    }
    cout<<""<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 's' was not declared in this scope
   11 |         int num=s[i]-'A';
      |                 ^
a.cc:12:14: error: 'n' was not declared in this scope
   12 |     num=(num+n)%26;
      |              ^
Language: C++

#include <iostream>
#include <string>

char shift(char c, int n)
{
  int order = c - 'A';
  order = (order + n) % 26;
  return (char)(offset + 'A');
}

int main()
{
  int N;
  std::string S;
  std::cin >> N;
  std::cin >> S;
  for (int i=0; i<S.length(); i++) S[i] = shift(S[i], N);
  std::cout << S << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'char shift(char, int)':
a.cc:8:17: error: 'offset' was not declared in this scope; did you mean 'off_t'?
    8 |   return (char)(offset + 'A');
      |                 ^~~~~~
      |                 off_t
Language: C++

#include <stdio.h>

int main() {
  int N;
  char S[10002];
  scanf("%d %s", &N, S);

  for(int i = 0; S[i] != '\0'; i++) {
    S[i] = 'A' + (S[i] - 'A' + N) % 26);
  }

  printf("%s\n", S);
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:39: error: expected ';' before ')' token
    9 |     S[i] = 'A' + (S[i] - 'A' + N) % 26);
      |                                       ^
      |                                       ;
Language: C++

#include <stdio.h>
 
int main(){
    int N;
    scanf("%d",&S);
    char S[10101];
    getchar();
    scanf("%[^\n]", S);
    
    for (int i = 0; S[i] != '\0'; i++){
        if(S[i] >= 'A' && S[i] <= 'Z'){
            S[i] += N;
            if(S[i] > 90){
                S[i] -= 26;
            }
            printf("%c",S[i]);
        }
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'S' was not declared in this scope
    5 |     scanf("%d",&S);
      |                 ^
Language: C++

#include <stdio.h>

int main()
{
   	int n,s;
   	char input[10000000];
   	scanf("%d", &n);
   	scanf("%s", &s);
   	
   	for(int i = 0; s[i] != '\0'; i++){
   		for(int j = 0; j < n; j++){
   			
		 	if(s[i] == 90){
			 	s[i] -= 26;	
			 	s[i]++;
		    } 
			else{
		    	s[i]++;
			}
		}
		printf("%c", s[i]);	
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: invalid types 'int[int]' for array subscript
   10 |         for(int i = 0; s[i] != '\0'; i++){
      |                         ^
a.cc:13:29: error: invalid types 'int[int]' for array subscript
   13 |                         if(s[i] == 90){
      |                             ^
a.cc:14:34: error: invalid types 'int[int]' for array subscript
   14 |                                 s[i] -= 26;
      |                                  ^
a.cc:15:34: error: invalid types 'int[int]' for array subscript
   15 |                                 s[i]++;
      |                                  ^
a.cc:18:26: error: invalid types 'int[int]' for array subscript
   18 |                         s[i]++;
      |                          ^
a.cc:21:31: error: invalid types 'int[int]' for array subscript
   21 |                 printf("%c", s[i]);
      |                               ^
Language: Java

import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner scn = new Scanner(System.in);
   	int n = scn.nextInt();
    String s = scn.next();
    int asc ;
    char ch[] = new char[s.length()];
    
    for(int i=0; i<s.length();i++){
    	asc = (int)s.charAt(i) + n;
      	if(asc > 90) acs -=26;
      	ch[i] = (char)asc;
    }
     for(int i=0; i<s.length();i++){
    	System.out.print(ch[i]);
    }
  }
}


Compiler output:
Main.java:14: error: cannot find symbol
      	if(asc > 90) acs -=26;
      	             ^
  symbol:   variable acs
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		string s = scn.next();
      	byte[] asc;
      	asc = s.getBytes("US-ASCII");
      	for (int i=0; i<s.length(); i++) {
        	acs[i] = acs[i] + n;
           if(asc[i]>90) asc[i] = acs[i] - 26;
        }
      	for (int i=0; i<s.length; i++) {
            System.out.print(asc[i]);
        }
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		string s = scn.next();
		^
  symbol:   class string
  location: class Main
Main.java:11: error: cannot find symbol
        	acs[i] = acs[i] + n;
        	^
  symbol:   variable acs
  location: class Main
Main.java:11: error: cannot find symbol
        	acs[i] = acs[i] + n;
        	         ^
  symbol:   variable acs
  location: class Main
Main.java:12: error: cannot find symbol
           if(asc[i]>90) asc[i] = acs[i] - 26;
                                  ^
  symbol:   variable acs
  location: class Main
4 errors
Language: C++

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

int main () {
    int N;
    cin >> N;
    string alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    string S;
    cin >> S;
    
    for (int i=0; i<S.size(); i++) {
        for (int j=0; j<26; j++) {
            if (alphabet.at(i)==S.at(j)) {
                cout << (alphabet.at((j+N)%26);
            }
        }
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: expected ')' before ';' token
   14 |                 cout << (alphabet.at((j+N)%26);
      |                         ~                     ^
      |                                               )
Language: C++

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

int main () {
    int N;
    cin >> N;
    string alphabet=ABCDEFGHIJKLMNOPQRSTUVWXYZ;
    string S;
    cin >> S;
    
    for (int i=0; i<S.size(); i++) {
        for (int j=0; j<26; j++) {
            if (alphabet.at(i)==S.at(j)) {
                cout << (alphabet.at(j+N))%26;
            }
        }
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' was not declared in this scope
    7 |     string alphabet=ABCDEFGHIJKLMNOPQRSTUVWXYZ;
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

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

  int len = strlen(S);

  rep (i, len) {
    int x = S[i] - 'A';
    x = (x + N) % 26;
    cout << 'A' + x;
  }
  cout << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   14 |   int len = strlen(S);
      |                    ^
      |                    |
      |                    std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

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

  int len = strlen(s);

  rep (i, len) {
    int x = s[i] - 'A';
    x = (x + N) % 26;
    cout << 'A' + x;
  }
  cout << endl;

  return 0;
}

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

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

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

  int len = strlen(s);

  rep (i, strlen) {
    int x = s[i] - 'A';
    x = (x + N) % 26;
    cout << 'A' + x;
  }
  cout << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: 's' was not declared in this scope
   14 |   int len = strlen(s);
      |                    ^
a.cc:2:39: error: cast from 'size_t (*)(const char*) noexcept' {aka 'long unsigned int (*)(const char*) noexcept'} to 'int' loses precision [-fpermissive]
    2 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                       ^~~~~~~~
a.cc:16:3: note: in expansion of macro 'rep'
   16 |   rep (i, strlen) {
      |   ^~~