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

#include <bits/stdc++.h>

#define ll long long
using namespace std;
 
int main(){
    int n; string s;
    cin>>n>>s;
    for(size_t i = 0; i < s.length(); ++i){
        if(s.at(i) <= 'Z'-n){s[i]+= n;}
      else{s[i]+=n-26+;}
    }
    cout <<s<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected primary-expression before ';' token
   11 |       else{s[i]+=n-26+;}
      |                       ^
Language: C++

#include <bits/stdc++.h>

#define ll long long
using namespace std;
 
int main(){
    int n; string s;
    cin>>n>>s;
    for(size_t i = 0; i < s.length(); ++i){
        if(s.at(i) <= 'Z'-n){s[i]+= n;}
      else{s[i]+=n-26+}
    }
    cout <<s<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected primary-expression before '}' token
   11 |       else{s[i]+=n-26+}
      |                       ^
Language: C++

#include <bits/stdc++.h>

#define ll long long
using namespace std;
 
int main()
{
 int N;
 char s[100010];
 scanf("%d␣%s",&n,s);
 int len=strlen(s);
 for(int i=0;i<len;i++){
 int x=s[i]-'A';
 x=(x+n)%26;
 putchar('A'+x);
 }
putchar('\n');
}


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

#include <bits/stdc++.h>

#define ll long long
using namespace std;
 
int main()
{
 int N;
 char S[100010];
 scanf("%d␣%s",&n,s);
 int len=strlen(s);
 for(int i=0;i<len;i++){
 int x=s[i]-'A';
 x=(x+n)%26;
 putchar('A'+x);
 }
putchar('\n');
}

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

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

int main(){
  int n;
  string s;
  cin >> n >> s;
  for(int i = 0; i < s.size(); i++){
    for(int j = 0; j < n; j++){
      if(s[i] != 'Z')
        s[i]++;
      else
        s[i] = 'A';
    }
  }
  cout << s << endl;
}

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

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

int main() {
    int n;
  cin>>n;
    string s;
  cin >>s;
    string a = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ";
    rep(i, s.size()) {
        rep(j, 26) {
            if(s[i] == a[j]) {
                s[i] = a[j + n];
            }
        }
    }
    rep(i,s.size()){
      cout<<s[i];
    }
    cout<<endl;
}

}


Compiler output:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

int main() {
    int n;
    string s;
    cin >> n >> s;
    vector<string> a(52, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
        rep(i, s.size()) {
        rep(j, 26) {
            if(s[i] == a[j]) {
                s[i] = a[j + n];
            }
        }
    }
    cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:19: error: expected ',' or ';' before 'for'
    2 | #define rep(i, n) for(int i = 0; i < n; i++)
      |                   ^~~
a.cc:10:9: note: in expansion of macro 'rep'
   10 |         rep(i, s.size()) {
      |         ^~~
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         rep(i, s.size()) {
      |             ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i, n) for(int i = 0; i < n; i++)
      |                                  ^
Language: C++

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

int main()
{
  ll n,x;
  string s;
  cin>>x>>s;
  ll n = s.size();
  x%=26;
  ll i;
  
  for(i=0;i<n;i++)
  {
    if((s[i] + n)>'Z')
      s[i] = 'A' + s[i] + n - 122;
    else
      s[i] = s[i] + x;
  }
  
  cout<<s<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: redeclaration of 'll n'
   10 |   ll n = s.size();
      |      ^
a.cc:7:6: note: 'll n' previously declared here
    7 |   ll n,x;
      |      ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <map>

#define ll long long
#define REP(i,n) for(int i = 0; i < n; i++)
#define PI 3.141592653589

using namespace std;

int gcd(int a, int b){return (a % b)? gcd(b, a % b) : b;}
int lcm(int a, int b){return a * b / gcd(a, b);}

void solve_146B(){
    char s[10010];
    int n;
    cin >> n >> s;

    int length = strlen(s);

    for(int i = 0; i < length; i++){
        int x = s[i] - 'A'; // Aから数えて何番目か
        x = (x + n) % 26;

        cout << (char)('A' + x);
    }

}

int main(void){
    solve_146B();
    
    return 0;
}

Compiler output:
a.cc: In function 'void solve_146B()':
a.cc:22:18: error: 'strlen' was not declared in this scope
   22 |     int length = strlen(s);
      |                  ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <map>
  +++ |+#include <cstring>
    7 |
Language: Java

package AtCoder.C114;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class Main {
    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static A.InputReader in = new A.InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);

    public static void main(String[] args) {
        int n = in.NI();
        StringBuilder x = new StringBuilder(in.next());
        n = n%26;
        for (int i=0;i<x.length();i++) {
            char pcar = x.charAt(i);
            for (int j=0;j<n;j++){
                if (pcar =='Z') {
                    pcar = 'A';
                } else {
                    pcar++;
                }
            }

            x.setCharAt(i, pcar);
        }
        out.println(x.toString());
        out.close();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NI() {
            return Integer.parseInt(next());
        }

        public long NL() {
            return Long.parseLong(next());
        }

    }


}


Compiler output:
Main.java:15: error: package A does not exist
    static A.InputReader in = new A.InputReader(inputStream);
            ^
Main.java:15: error: package A does not exist
    static A.InputReader in = new A.InputReader(inputStream);
                                   ^
2 errors
Language: C++

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

int main() {
    int n;
    string s;
    cin >> n >> s;
    for(int i=0;i<s.size();i++){
        s.at(i)=(char)((S.at(i) - 'A' + N) % 26 + 'A');
    }
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'S' was not declared in this scope
    9 |         s.at(i)=(char)((S.at(i) - 'A' + N) % 26 + 'A');
      |                         ^
a.cc:9:41: error: 'N' was not declared in this scope
    9 |         s.at(i)=(char)((S.at(i) - 'A' + N) % 26 + 'A');
      |                                         ^
Language: Java

#include <iostream>

using namespace std;

int main()
{
	int n;
	string S, myString = "abcdefghijklmnopqrstuvwxyz";
	cin >> n >> S;
	for (int i = 0; i < S.length(); i++)
		S[i] = myString[(myString.find(S[i])+n)%26];
		
	cout << S << endl;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:1: error: class, interface, enum, or record expected
#include <iostream>
         ^
Main.java:9: error: not a statement
	cin >> n >> S;
	         ^
Main.java:13: error: not a statement
	cout << S << endl;
	          ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
5 errors
Language: C++

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




    int main()
    {
        int n;
        string s;
        std::cin >> n >> s;
        int x;
        for (int i = 0; i < s.size; ++i)
        {
            x = s[i] - 'A';
            x = (x+n)%26;
            s[i] = 'A' + x;
            std::cout << s[i] << "\n";
        }
        return 0;
    }


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

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




    int main()
    {
        int n;
        string s;
        std::cin >> n >> s;
        int x;
        for (int i = 0; i < s.size(); ++i)
        {
            x = s[i] - 'A';
            x = (x+n)%26;
            s[i] = 'A' + x;
            std::cout << s[i] << "\n";
        }
        return 0;
    }


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

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




    int main()
    {
        int n;
        char s[10010];
        scanf("%d %s", %n, s );
        int len = strlens(s);
        for (int i = 0; i < len; ++i)
        {
            int x = s[i]- 'A';
            x = (x+n)%26;
            putchar('A'+x);
        }
        putchar('\n')
        return 0;
    }


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

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




    int main()
    {
        int n;
        char s[10010];
        scanf("%d %s", %n, s );
        int len = strlens(s);
        for (int i = 0; i < len; ++i)
        {
            int x = s[i]- 'A';
            x = (x+n)%26;
            putchar('A'+x);
        }
        putchar('\n')
        return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected primary-expression before '%' token
   12 |         scanf("%d %s", %n, s );
      |                        ^
a.cc:13:19: error: 'strlens' was not declared in this scope; did you mean 'strlen'?
   13 |         int len = strlens(s);
      |                   ^~~~~~~
      |                   strlen
a.cc:20:22: error: expected ';' before 'return'
   20 |         putchar('\n')
      |                      ^
      |                      ;
   21 |         return 0;
      |         ~~~~~~
Language: C

#include<stdio.h>
int main ()
{
    int n,a,i;
    scanf("%d",&n);
    char x[100];
    scanf("%s",x);
    a=strlen(x);
    for(i=0;i<a;i++){
            if(x[i]>='A' && x[i]<='X'){
        x[i]=x[i]+n;
            }
            else if(x[i]=='Y'){
                x[i]='A';
            }
            else if(x[i]=='Z'){
                x[i]='B';
            }
    }
    printf("%s",x\n);
}


Compiler output:
main.c: In function 'main':
main.c:8:7: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    8 |     a=strlen(x);
      |       ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main ()
main.c:8:7: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    8 |     a=strlen(x);
      |       ^~~~~~
main.c:8:7: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:20:18: error: stray '\' in program
   20 |     printf("%s",x\n);
      |                  ^
main.c:20:18: error: expected ')' before 'n'
   20 |     printf("%s",x\n);
      |           ~      ^~
      |                  )
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int number = scanner.nextInt();
        String word = scanner.next();
        String answer = "";
        for(int i = 0; i < word.length; i ++){
          answer += (word.charAt(i) + number);
        }
        System.out.println(answer);
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
        for(int i = 0; i < word.length; i ++){
                               ^
  symbol:   variable length
  location: variable word of type String
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> vll;
typedef vector<pair<int,int>> vp;
typedef pair<int,int> pii;
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define REP(i,n) for(int i=1;i<=(int)(n);i++)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define ALL(a)  a.begin(),a.end()
#define RALL(a) a.begin(),a.end(),greater<int>()
#define ROT(a) a.begin(),a.begin()+1,a.end()
#define RROT(a) a.begin(),a.end()-1,a.end()
#define PB push_back
#define MP make_pair
#define PI acos(-1.0)
#define sz(a) a.size()
const ll MOD = 1e9+7;
const int MAX = 10000000;
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }
//cout << 'H' << endl;
//next_permutation(ALL(p));
//typedef priority_que<int> pque;//これは大きい順
//typedef priority_que<int, vector<int>, greater<int>> pque;//これは小さい順


int main(){
	int n;
	cin >> n;
	char s[10010];
	scanf("%s",s);
	int len = strlen(s);
	rep(i,len){
		int x = s[i]-'A';
		x = (x+n)%26
		printf("%c",'A'+x);
	}
	printf("\n");


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:29: error: expected ';' before 'printf'
   41 |                 x = (x+n)%26
      |                             ^
      |                             ;
   42 |                 printf("%c",'A'+x);
      |                 ~~~~~~
Language: C++

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

int main(int argc, char const *argv[]) {
  int n;
  string s;
  cin >> n >> s;
  for(int i = 0;i < n;) {
    s.at(i) = s.at(i) + 'z';
    if(s.at(i) > 'z') {
      s.at(i) -= 'a';
    }
    cout << s.at(i);
  }
  cout << << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:11: error: expected primary-expression before '<<' token
   15 |   cout << << endl;
      |           ^~
Language: C

#include <iostream>
#include <string>
using namespace std;
int main()
{
    string str;
    int k;
    cin >> k;
    cin >> str;

    for (int i=0; i<k; i++)
    {
        int asc = str[i];
        int rem = asc - (26 - k - 'a');
        int m = rem % 26;
        str[i] = (char)(m + 'a');
        cout << str;
    }
}


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

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

void f(char& ch)
{
	ch++;
	if(ch > 'Z') ch = 'A';
}

int main()
{
	int n;
	scanf("%d", &n);
	char s[1 << 14];
	scanf(" ");
	gets(s);
	int len = strlen(s);
	for(int i = 0; i < len; i++)
	{
		for(int j = 0; j < n; j++)
		{
			f(s[i]);
		}
	}
	puts(s);
}


Compiler output:
main.c:4:12: error: expected ';', ',' or ')' before '&' token
    4 | void f(char& ch)
      |            ^
main.c: In function 'main':
main.c:16:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   16 |         gets(s);
      |         ^~~~
      |         fgets
main.c:22:25: error: implicit declaration of function 'f' [-Wimplicit-function-declaration]
   22 |                         f(s[i]);
      |                         ^
Language: C++

#include <stdio.h>
#include <string.h>
#include<iostream>
using namespace std;
void f(char& ch)
{
	ch++;
	if(ch > 'Z') ch = 'A';
}

int main()
{
	int n;
	scanf("%d", &n);
	string s;
	cin >> s;
	int len = strlen(s);
	for(int i = 0; i < len; i++)
	{
		for(int j = 0; j < n; j++)
		{
			f(s[i]);
		}
	}
	puts(s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   17 |         int len = strlen(s);
      |                          ^
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
In file included 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)
      |                       ~~~~~~~~~~~~^~~
a.cc:25:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   25 |         puts(s);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

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

void f(char& ch)
{
	ch++;
	if(ch > 'Z') ch = 'A';
}

int main()
{
	int n;
	scanf("%d", &n);
	char s[1 << 14];
	scanf(" ");
	gets(s);
	int len = strlen(s);
	for(int i = 0; i < len; i++)
	{
		for(int j = 0; j < n; j++)
		{
			f(s[i]);
		}
	}
	puts(s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   16 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

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

using namespace std;

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

    for(int i=0;i<S.length();i++){
        if((int)S[i] + N > 90){
            Ndash = N - (91 - (int)S[i]);
            changeChar = (int)'A' + Ndash;
            S[i] = (char)changeChar;

        }
        else{
            changeChar = (int)S[i] + 2;
            S[i] = (char)changeChar;
        }
    }

    cout << S;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'changeChar' was not declared in this scope; did you mean 'changedChar'?
   18 |             changeChar = (int)'A' + Ndash;
      |             ^~~~~~~~~~
      |             changedChar
a.cc:23:13: error: 'changeChar' was not declared in this scope; did you mean 'changedChar'?
   23 |             changeChar = (int)S[i] + 2;
      |             ^~~~~~~~~~
      |             changedChar
Language: C++

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

int main(){
  int n;
  string s;
  cin>>n>>s;
  string d="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ";
  vector<char> a;
  for(int i=0; i<s.size(); i++){
    for(int j=0; j<26; j++){
      if(s[i]==d[j]){
        a.push_back(d[j+n]);
    }
  }
  for(int i=0; i<s.size(); i++)
    cout << a[i];
  cout << endl;
}

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

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

int main(){
  int n;
  string s;
  cin>>n>>s;
  string d="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ";
  vector<string> a;
  for(int i=0; i<s.size(); i++){
    for(int j=0; j<26; j++){
      if(s[i]==d[j]){
        a.push_back(d[j+n]);
    }
  }
  for(int i=0; i<s.size(); i++)
    cout << a[i];
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   13 |         a.push_back(d[j+n]);
      |         ~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::vector<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::vector<std::__cxx11::basic_string<char> >::value_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.Scanner;


public class Main {

    
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int b = in.nextInt();
        String a=in.next();
        String str="";
        for(int i=0;i<a.length();i++) {
        int asc = (int) a.charAt(i);
        if((asc+b)<=90) {
            char as = (char) (asc+b);
            str+=as;
        } else {
            char as = (char) ((asc-26) + b);
            str+=as;
        }
    }
    System.out.println(str);   
        
        
    }
    
   

Compiler output:
Main.java:25: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String text = scanner.next();
        ROT(n, text);
    }


    public static void ROT(int n, String text){
        for(int i = 0; i < text.length(); i++){
            int s;
            char q;
            s = text.charAt(i) + n;
            if(s > 90){
                int f = s - 91;
                s = f + 65;
            }
            q = (char) s;
            System.out.print(q);
        }

    }

Compiler output:
Main.java:25: error: reached end of file while parsing
    }
     ^
1 error
Language: Java


import java.util.Scanner;

public class C {

	public static void main(String[] args) {
String S="ABCXYZ";
Scanner in=new Scanner(System.in);
int n=in.nextInt();

String temp = S.substring(n);
String temp2=S.substring(0,n);
S=temp;
S+=temp2;
System.out.println(S);



	}

}


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

package contest;

import java.util.Scanner;

public class C {

	public static void main(String[] args) {
String S="ABCXYZ";
Scanner in=new Scanner(System.in);
int n=in.nextInt();

String temp = S.substring(n);
String temp2=S.substring(0,n);
S=temp;
S+=temp2;
System.out.println(S);



	}

}


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

#include <bits/stdc++.h>
 
using namespace std;
int main() {
 
 
    string s1;
    int n;
    cin >> n >> s1;

    for (int i=0;i<s1.size();i++) {
        s1[i] = s1[i] + n;
        if (s1[i] > 'Z') s[i] -= 26;
    }

    cout << s1;
 
    
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: 's' was not declared in this scope
   13 |         if (s1[i] > 'Z') s[i] -= 26;
      |                          ^
Language: C++



using namespace std;

int main(){
   int k;
   cin>>k;
  string S;
  getline(cin, S); 
  int n=S.length();
  for(int i=0;i<n;i++){
     int x=S[i]-'A';
     x=(n+x)%26; 

    putchar(x+'A');
  }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:4: error: 'cin' was not declared in this scope
    7 |    cin>>k;
      |    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string S;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | 
a.cc:9:16: error: 'S' was not declared in this scope
    9 |   getline(cin, S);
      |                ^
a.cc:9:3: error: 'getline' was not declared in this scope
    9 |   getline(cin, S);
      |   ^~~~~~~
a.cc:15:5: error: 'putchar' was not declared in this scope; did you mean 'char'?
   15 |     putchar(x+'A');
      |     ^~~~~~~
      |     char
a.cc:16:4: error: expected '}' at end of input
   16 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bit/stdc++.h>
using namespace std;
int main()
{
  	int n;
 	cin >> n;
  	string s;
  	cin >> s;
  	for(int i = 0 ; i < s.size() ;i++){
     	int x = (s[i] - 'A' + n)%26;
      	cout << char(x + 'A');
    }
 	return 0; 
}

Compiler output:
a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
    1 | #include<bit/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main{
  char s[10010];
  int n,x;
  cin >> n;
  cin >> s;
  for (int i=0; i < n; i++){
    x = s[i] - 'A';
    x = (x+n)%26;
    s[i] = 'A' + x;
  }
  cout << s << endl;
  return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'char'
    5 |   char s[10010];
      |   ^~~~
a.cc:5:3: error: expected '}' before 'char'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin >> n;
      |   ^~~
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin >> s;
      |   ^~~
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for (int i=0; i < n; i++){
      |   ^~~
a.cc:9:17: error: 'i' does not name a type
    9 |   for (int i=0; i < n; i++){
      |                 ^
a.cc:9:24: error: 'i' does not name a type
    9 |   for (int i=0; i < n; i++){
      |                        ^
a.cc:14:3: error: 'cout' does not name a type
   14 |   cout << s << endl;
      |   ^~~~
a.cc:15:3: error: expected unqualified-id before 'return'
   15 |   return 0;
      |   ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include<iostream>
#include<cstring>


using namespace std;

int main() {


	std::ifstream in("D:\\myDocHome\\AtCoderTest\\input.txt");
	std::cin.rdbuf(in.rdbuf());



	int n;
	string s;

	cin >> n;
	cin >> s;

	char* chrs = new char[s.size() + 1];
	strcpy(chrs,  s.c_str());

	for (int i = 0;i < s.size();i++) {

		int c = chrs[i] + n;
		if (c > 90) {
			c = c - 26;
		}
		chrs[i] = c;
	}


	cout << chrs << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: variable 'std::ifstream in' has initializer but incomplete type
   10 |         std::ifstream in("D:\\myDocHome\\AtCoderTest\\input.txt");
      |                         ^
a.cc:3:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>'
    2 | #include<cstring>
  +++ |+#include <fstream>
    3 |
Language: C++


#include<iostream>
#include<cstring>


using namespace std;

int main() {



	int n;
	string s;

	cin >> n;
	cin >> s;

	char* chrs = new char[s.size() + 1];
	strcpy_s(chrs, s.size() + 1, s.c_str());

	for (int i = 0;i < n;i++) {

		int c = chrs[i] + n;
		if (c > 90) {
			c = c - 26;
		}
		chrs[i] = c;
	}


	cout << chrs << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   19 |         strcpy_s(chrs, s.size() + 1, s.c_str());
      |         ^~~~~~~~
      |         strcpy
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  string S;
  cin >> N >> S;
  for(int i=0; i<S.size(); i++){
    cout << char('A'+(S[i]+N+'A')%26);
  }
  endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: statement cannot resolve address of overloaded function
   10 |   endl;
      |       ^
Language: Java

import java.util.Scanner;
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    String s = scan.next();
    for(int i = 0; i < s.length(); i ++){
      s.charAt(i) = s.charAt(i) + n;
      if(s.charAt(i) > Z){
        s.charAt(i) -= 25;
      }
    }
  }
}


Compiler output:
Main.java:9: error: unexpected type
      s.charAt(i) = s.charAt(i) + n;
              ^
  required: variable
  found:    value
Main.java:10: error: cannot find symbol
      if(s.charAt(i) > Z){
                       ^
  symbol:   variable Z
  location: class Main
Main.java:11: error: unexpected type
        s.charAt(i) -= 25;
                ^
  required: variable
  found:    value
3 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int s = scan.next();
    for(int i = 0; i < s.length(); i ++){
      s.charAt(i) = s.charAt(i) + n;
      if(s.charAt(i) > Z){
        s.charAt(i) -= 25;
      }
    }
  }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
    int s = scan.next();
                     ^
Main.java:7: error: int cannot be dereferenced
    for(int i = 0; i < s.length(); i ++){
                        ^
Main.java:8: error: int cannot be dereferenced
      s.charAt(i) = s.charAt(i) + n;
       ^
Main.java:8: error: int cannot be dereferenced
      s.charAt(i) = s.charAt(i) + n;
                     ^
Main.java:9: error: int cannot be dereferenced
      if(s.charAt(i) > Z){
          ^
Main.java:9: error: cannot find symbol
      if(s.charAt(i) > Z){
                       ^
  symbol:   variable Z
  location: class Main
Main.java:10: error: int cannot be dereferenced
        s.charAt(i) -= 25;
         ^
7 errors
Language: C++

#include <iostream>
#include <array>
#include <string>

using namespace std;
int lenght(char* str) {
	int n = strlen(str);
	return n;
}

int main(void) {
	int N;
	char S[1000] = {};
	cin >> N >> S;
	int a = lenght(S);
	array<char, 26>alf = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };

	for (int j = 0; j < a; j++) {
		for (int i = 0; i < 26; i++) {
			if (S[j] == alf[i] && N + i < 26) {
				S[j] = alf[i + N];
				break;
			}
			else if (S[j] == alf[i] && N + i >= 26) {
				S[j] = alf[i + N - 26];
				break;
			}
			else {

			}
		}
	}
	cout << S << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int lenght(char*)':
a.cc:7:17: error: 'strlen' was not declared in this scope
    7 |         int n = strlen(str);
      |                 ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <array>
  +++ |+#include <cstring>
    3 | #include <string>
Language: C++

#include "pch.h"
#include "bits/stdc++.h"

using namespace std;


#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(i) (i).begin(), (i).end()
#define rall(i) (i).begin(), (i).end(), greater<int>()

#define int long long

#define elif else if
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define fst first
#define sec second

template <typename T>
void print(T x)
{
	std::cout << x <<" " ;
}


template <typename T>
void println(T x)
{
	std::cout << x << "\n";
}

signed main(void) {
	int N;
	string S;
	cin >> N>>S;
	rep(i, S.size()) {
		if (S[i] + N <= 'Z') {
			S[i] = S[i] + N;
		}
		else {
			S[i] = S[i] + N-26;
		}
	}
	print(S);
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  char s[10010];
  scanf(%d %s,&n,&s);
  int len=strlen(s);
  for(int i=0;i<len;i++){
    int x=s[i]-'A';
    x=(x+n)%26;
    putchar('A'+x);
  }
  putchar('\n');
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '%' token
    6 |   scanf(%d %s,&n,&s);
      |         ^
a.cc:6:10: error: 'd' was not declared in this scope
    6 |   scanf(%d %s,&n,&s);
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  char s[10010];
  scanf(%d %s,&n,s);
  int len=strlen(s);
  for(int i=0;i<len;i++){
    int x=s[i]-'A';
    x=(x+n)%26;
    putchar('A'+x);
  }
  putchar('\n');
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '%' token
    6 |   scanf(%d %s,&n,s);
      |         ^
a.cc:6:10: error: 'd' was not declared in this scope
    6 |   scanf(%d %s,&n,s);
      |          ^
Language: C++

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

int main() {
  int n;
  string s;
  cin >> n >> s;
  for(int i=0;i<s.size();i++){
    s[i] += n;
    if(s[i] > 'Z'){
      s[i]='A'+(s[i]-'Z')-1;
    }
    cout << s << endl;
}


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

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

int main() {
  int n;
  string s;
  cin >> n >> s;
  for(int i=0;i<s.size();i++){
    s[i] += n;
    if(s[i] > 'Z'){
      s[i]='A'+(S[i]-'Z')-1
    }
    cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'S' was not declared in this scope
   11 |       s[i]='A'+(S[i]-'Z')-1
      |                 ^
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.Scanner;

public class Main {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  boolean ans = true;
  String s = sc.next();
  char c[] = s.toCharArray();
  if (n % 2 == 1) {
   System.out.println("No");
  } else {
   for (int i = 0; i <= (s.length() / 2) - 1; i++) {
    if (c[i] != c[i +( s.length() / 2)]) {
     //System.out.println("!");
     ans = false;
    }
   }
   if (ans) {
    System.out.println("Yes");
   } else {
    System.out.println("No");
   }
  }

 }
}import java.util.Scanner;

public class Main {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  boolean ans = true;
  String s = sc.next();
  char c[] = s.toCharArray();
  if (n % 2 == 1) {
   System.out.println("No");
  } else {
   for (int i = 0; i <= (s.length() / 2) - 1; i++) {
    if (c[i] != c[i +( s.length() / 2)]) {
     //System.out.println("!");
     ans = false;
    }
   }
   if (ans) {
    System.out.println("Yes");
   } else {
    System.out.println("No");
   }
  }

 }
}
import java.util.Scanner;

public class Main {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  int n = sc.nextInt();
  boolean ans = true;
  String s = sc.next();
  char c[] = s.toCharArray();
  if (n % 2 == 1) {
   System.out.println("No");
  } else {
   for (int i = 0; i <= (s.length() / 2) - 1; i++) {
    if (c[i] != c[i +( s.length() / 2)]) {
     //System.out.println("!");
     ans = false;
    }
   }
   if (ans) {
    System.out.println("Yes");
   } else {
    System.out.println("No");
   }
  }

 }
}

Compiler output:
Main.java:27: error: class, interface, enum, or record expected
}import java.util.Scanner;
 ^
Main.java:54: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: C++

#include<Bits\stdc++.h>
using namespace std;
int main()
{
    int n;
    string s;
    cin>>n>>s;
    char achar='A';
    for(int i=0;i<s.length();i++){
        char c='A'+(s[i]-'A'+n)%26;
        cout<<c;
    }
    cout<<"\n";
    return 0;
}

Compiler output:
a.cc:1:9: fatal error: Bits\stdc++.h: No such file or directory
    1 | #include<Bits\stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
    int n;
    char s[10001];
    scanf("%d %s",&n,s);
    int len=strlen(s);
    int i;
    for(i=0;i<len;i++){
        int x=s[i]-'A';
        x=(x+n)%26;
        putchar('A'+x);
    }
    putchar("\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   15 |     putchar("\n");
      |             ^~~~
      |             |
      |             const char*
In file included from a.cc:1:
/usr/include/stdio.h:618:25: note:   initializing argument 1 of 'int putchar(int)'
  618 | extern int putchar (int __c);
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#include <functional>
#include <iomanip>
#include <bitset>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
const long long mod = 1000000007;
typedef long long ll;

int main() {

	int N;
	cin >> N;
	string str;
	cin >> str;

	rep(i, str.size()) {
		str.at(i) = str.at(i) + k;
		if (str.at(i) > 'Z') {
			int j = str.at(i) - 'Z' - 1;
			str.at(i) = 'A' + j;
		}
	}

	cout << str << endl;



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:41: error: 'k' was not declared in this scope
   22 |                 str.at(i) = str.at(i) + k;
      |                                         ^
Language: C++

#include <iostream>
#define rep(i, n) for (int = i; i < n; i++)
using namespace std;

int main() {
  int n;
  string s;
  cin >> n >> s;
  rep(i, s.size()){
    s[i] = ((s[i] - 'A' + n) % 26) + 'A';
  }
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:28: error: expected unqualified-id before '=' token
    2 | #define rep(i, n) for (int = i; i < n; i++)
      |                            ^
a.cc:9:3: note: in expansion of macro 'rep'
    9 |   rep(i, s.size()){
      |   ^~~
a.cc:2:28: error: expected ';' before '=' token
    2 | #define rep(i, n) for (int = i; i < n; i++)
      |                            ^
a.cc:9:3: note: in expansion of macro 'rep'
    9 |   rep(i, s.size()){
      |   ^~~
a.cc:2:28: error: expected primary-expression before '=' token
    2 | #define rep(i, n) for (int = i; i < n; i++)
      |                            ^
a.cc:9:3: note: in expansion of macro 'rep'
    9 |   rep(i, s.size()){
      |   ^~~
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   rep(i, s.size()){
      |       ^
a.cc:2:30: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (int = i; i < n; i++)
      |                              ^
a.cc:2:38: error: expected ')' before ';' token
    2 | #define rep(i, n) for (int = i; i < n; i++)
      |                       ~              ^
a.cc:9:3: note: in expansion of macro 'rep'
    9 |   rep(i, s.size()){
      |   ^~~
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   rep(i, s.size()){
      |       ^
a.cc:2:40: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (int = i; i < n; i++)
      |                                        ^
Language: C

#include <stdio.h>
int main(void){
	int num;
	char string[10001];
	scanf("%d%s",&num,&string);
	for(i=0,string[i]!=\0,i++){
		string[i]+=num;
		if(string[i]>'Z'){
			string[i]-'A';
		}
	}
	printf("%s",string);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
    6 |         for(i=0,string[i]!=\0,i++){
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:28: error: stray '\' in program
    6 |         for(i=0,string[i]!=\0,i++){
      |                            ^
main.c:6:34: error: expected ';' before ')' token
    6 |         for(i=0,string[i]!=\0,i++){
      |                                  ^
      |                                  ;
main.c:6:34: error: expected expression before ')' token
Language: C++

#include<iostream.h>
#include<string.h>
using namespace.std
void main()
{
  int n;
  char a[100000];
  char b[100000];
  cin>>n;
  for(int i=0;i<strlen(a);i++)
    cin>>a[i];
  for (int i=0;i<strlen(a);i++)
  {
    if((a[i]+n)>=92)
      b[i]=65+a[i]+n-91;
    else
      b[i]=a[i]+n;
  }
   for (int i=0;i<strlen(b);i++)
  {
  cout<<b[i];
   }
}


Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

from sys import stdin

N = int(input())
S = input()

ans = ''

for s in S:
    asc = ord(s) + N
    if asc > ord('Z'):
        asc -= 26
    ans += chr(asc)
print(ans)

Compiler output:
a.cc:6:7: error: empty character constant
    6 | ans = ''
      |       ^~
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import stdin
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  string S;
  cin >> S;
  for(int i = 0; i < S.size(); i++){
    S[i] = S[i] + a;
    if(S[i] > "Z"){
      S[i] = S[i] - 26;
    }
  }
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'a' was not declared in this scope
   10 |     S[i] = S[i] + a;
      |                   ^
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(S[i] > "Z"){
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int d;
  cin>>d;
  string a;
  cin>>a;
  vector<int> b(a.size);
  for(int i=0; i<a.size; i++){
    b[i]=a[i]-'A'+d;
  }
  for(int i=0; i<a.size; i++){
    b[i]%=26;
  }
  string c="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  for(int i=0; i<a.size; i++)
  cout<<c[b[i]];
  cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
    9 |   vector<int> b(a.size);
      |                 ~~^~~~
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:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
a.cc:10:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |   for(int i=0; i<a.size; i++){
      |                  ~~^~~~
      |                        ()
a.cc:13:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 |   for(int i=0; i<a.size; i++){
      |                  ~~^~~~
      |                        ()
a.cc:17:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |   for(int i=0; i<a.size; i++)
      |                  ~~^~~~
      |                        ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int d;
  cin>>d;
  string a;
  cin>>a;
  Vector<int> b(a.size);
  for(int i=0; i<a.size; i++){
    b[i]=a[i]-'A'+d;
  }
  for(int i=0; i<a.size; i++){
    b[i]%=26;
  }
  string c="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  for(int i=0; i<a.size; i++)
  cout<<c[b[i]];
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'Vector' was not declared in this scope
    9 |   Vector<int> b(a.size);
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   Vector<int> b(a.size);
      |          ^~~
a.cc:10:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |   for(int i=0; i<a.size; i++){
      |                  ~~^~~~
      |                        ()
a.cc:11:5: error: 'b' was not declared in this scope
   11 |     b[i]=a[i]-'A'+d;
      |     ^
a.cc:13:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 |   for(int i=0; i<a.size; i++){
      |                  ~~^~~~
      |                        ()
a.cc:14:5: error: 'b' was not declared in this scope
   14 |     b[i]%=26;
      |     ^
a.cc:17:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |   for(int i=0; i<a.size; i++)
      |                  ~~^~~~
      |                        ()
a.cc:18:11: error: 'b' was not declared in this scope
   18 |   cout<<c[b[i]];
      |           ^