submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s089460058 | p03992 | C++ | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#... | a.cc: In function 'int main()':
a.cc:81:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)'
81 | a.insert(4,' ');
| ~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /... |
s055347690 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
for(int i=0;i<n;i++){
if(i==4){
cout<<" "<<flush;
}
cout<<s[i]<<flush;
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: 'n' was not declared in this scope
7 | for(int i=0;i<n;i++){
| ^
|
s826724695 | p03992 | C++ | //#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, ... | a.cc: In function 'int main()':
a.cc:54:11: error: 's' was not declared in this scope
54 | cin >>s;
| ^
|
s609755203 | p03992 | C++ | #include<bits/stdc++.h>
using nameapsce std;
int main()
{
string s;
cin>>s;
for(int i=0;i<12;i++)
{cout<<s[i];
if(i==3)cout<<" ";}
} | a.cc:2:7: error: expected nested-name-specifier before 'nameapsce'
2 | using nameapsce std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
5 | string s;
| ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include... |
s534307882 | p03992 | C++ | //#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const long long INF= 1e+18+1;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000... | a.cc: In function 'int main()':
a.cc:17:9: error: 'n' was not declared in this scope
17 | rep(i,n){
| ^
a.cc:5:43: note: in definition of macro 'rep'
5 | #define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
| ^
|
s728948916 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
for(int i=0;i<4;i++)
cout<<s[i];
cout<<" ";
for(int i=4;i<=s.size;i++)
cout<<s[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:10:22: 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 unsig... |
s477383471 | p03992 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
for(int i=1;i<=12;i++)
{
cout<<getchar();
if(i==4)
putchar(" ");
}
cout<<"\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:10:21: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
10 | putchar(" ");
| ^~~
| |
| const char*
In file included from /usr/include/c++/14/cstdio:42,
f... |
s685229515 | p03992 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
for(int i=1;i<=12;i++)
{
putchar(getchar());
if(i==4)
putchar(" ");
}
cout<<"\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:10:21: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
10 | putchar(" ");
| ^~~
| |
| const char*
In file included from /usr/include/c++/14/cstdio:42,
f... |
s240389932 | p03992 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i=0;i < (int)(n);i++)
int main(){
string s,t;
cin >> s;
t=substr(0,4);
s=substr(4,8);
cout << t+" "+s << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:5: error: 'substr' was not declared in this scope
12 | t=substr(0,4);
| ^~~~~~
|
s806614777 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
char s[13];
cin >> s;
for(inti=0;i<12;i++){
cout << s[i];
if(i==3){
cout << " ";
}
}
}
| a.cc: In function 'int main()':
a.cc:6:7: error: 'inti' was not declared in this scope; did you mean 'int'?
6 | for(inti=0;i<12;i++){
| ^~~~
| int
a.cc:6:14: error: 'i' was not declared in this scope
6 | for(inti=0;i<12;i++){
| ^
|
s068585258 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
cout << s.at(i);
}
if (i == 3) {
cout << ' ';
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
10 | if (i == 3) {
| ^
|
s105790526 | p03992 | C++ | #include <iostream>
char n[13];
int main(){
cin>>n;
for(int i=0;i<4;i++)cout<<n[i];
cout<<" ";
for(int i=4;i<12;i++)cout<<n[i];
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; //... |
s405633317 | p03992 | C | (defun in()
(let ((s (read-char)))
(if (or (eq s nil) (eq s #\space) (eq s #\newline))
(in)
s)))
(defun func (x)
(when (< x 12)
(progn
(when (eq x 4)
(princ " "))
(princ (in))
(func (1+ x)))))
(func 0)
(princ #\newline)
| main.c:1:7: error: expected ')' before 'in'
1 | (defun in()
| ^~~
| )
main.c:3:34: error: stray '#' in program
3 | (if (or (eq s nil) (eq s #\space) (eq s #\newline))
| ^
main.c:3:35: error: stray '\' in program
3 | (if (or (eq s... |
s322214586 | p03992 | C++ | #include <iostraem>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
for(int i = 0; i < 4; i++) cout << s[i];
cout << " ";
for(int i = 4; i < 12; i++) cout << s[i];
cout << endl;
} | a.cc:1:10: fatal error: iostraem: No such file or directory
1 | #include <iostraem>
| ^~~~~~~~~~
compilation terminated.
|
s774570380 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
for (int i = 0; i< 4; i++){
char j; cin >> j;
cout << j;
}
cout << " ";
for (int i = 0; i < 8; i++) {
char j; ... | a.cc: In function 'int main()':
a.cc:17:14: error: expected '}' at end of input
17 | cout << endl;
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s889285707 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
for (int i = 0; i< 4; i++)
char j; cin >> j;
cout << j;
}
cout << " ";
for (int i = 0; i < 8; i++) {
char j; c... | a.cc: In function 'int main()':
a.cc:9:20: error: 'j' was not declared in this scope; did you mean 'jn'?
9 | char j; cin >> j;
| ^
| jn
a.cc: At global scope:
a.cc:12:1: error: 'cout' does not name a type
12 | cout << " ";
| ^~~~
a.cc:13:1: error: expec... |
s454897613 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
for (int i = 0; i< 4; i++)
char i; cin >> i;
cout << i;
}
cout << " ";
for (int i = 0; i < 8; i++) {
char i; c... | a.cc: In function 'int main()':
a.cc:9:10: error: redeclaration of 'char i'
9 | char i; cin >> i;
| ^
a.cc:8:12: note: 'int i' previously declared here
8 | for (int i = 0; i< 4; i++)
| ^
a.cc:9:20: error: 'i' was not declared in this scope
9 | char i; cin >> i;
... |
s924939439 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
for (int i = 0; i< 4; i++)
char i; cin >> i;
cout << i;
}
cout << " " << endl;
for (int i = 0; i < 8; i++) {
c... | a.cc: In function 'int main()':
a.cc:9:10: error: redeclaration of 'char i'
9 | char i; cin >> i;
| ^
a.cc:8:12: note: 'int i' previously declared here
8 | for (int i = 0; i< 4; i++)
| ^
a.cc:9:20: error: 'i' was not declared in this scope
9 | char i; cin >> i;
... |
s164937030 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
for (int i = 0, i< 4; i++)
char i; cin >> i;
cout << i;
}
cout << " " << endl;
for (int i = 09; i < 8; i++) {
... | a.cc:13:14: error: invalid digit "9" in octal constant
13 | for (int i = 09; i < 8; i++) {
| ^~
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '<' token
8 | for (int i = 0, i< 4; i++)
| ^
| ;
a.cc:8:20: error: expected ... |
s020481356 | p03992 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
System.out.println(s.substr(0, 4) + " " + s.substr(4, 8));
}
} | Main.java:7: error: cannot find symbol
System.out.println(s.substr(0, 4) + " " + s.substr(4, 8));
^
symbol: method substr(int,int)
location: variable s of type String
Main.java:7: error: cannot find symbol
System.out.println(s.substr(0, 4) + " " + s.substr(4, 8));
... |
s354107366 | p03992 | C++ | #include<iostream>
using namespace std;
int main(void){
string s;
cin >> s;
cout << s.insert(4,' ');
}
| a.cc: In function 'int main()':
a.cc:6:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)'
6 | cout << s.insert(4,' ');
| ~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes... |
s843501758 | p03992 | C++ | #include<iostream>
using namespace std;
int main(void){
string s;
cin >> s;
s = s.insert(3," ");
cout << s);
}
| a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before ')' token
7 | cout << s);
| ^
| ;
|
s093583318 | p03992 | C++ | #include<iostream>
using namespace std;
int main(void){
string s;
cout << s.substring(0,4) << " " <<s.substring(4,8);
} | a.cc: In function 'int main()':
a.cc:5:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
5 | cout << s.substring(0,4) << " " <<s.substring(4,8);
| ^~~~~~~~~
| substr
a.cc:5:39: error: 'std::string' {a... |
s439118724 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S; cin>>S;
cout<<S.at(0)<<S.at(1)<<S.at(2)<<S.at(3)<<" "<<S.at(4)<<S.at(5)<<S.at(6)<<S.at(7)<<S.at(8)<<S.at(9)<<S.at(10)<<S>at(11)<<endl;
} | a.cc: In function 'int main()':
a.cc:6:116: error: 'at' was not declared in this scope
6 | cout<<S.at(0)<<S.at(1)<<S.at(2)<<S.at(3)<<" "<<S.at(4)<<S.at(5)<<S.at(6)<<S.at(7)<<S.at(8)<<S.at(9)<<S.at(10)<<S>at(11)<<endl;
| ... |
s742215125 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
cout<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<' '<<a[5]<<a[6]<<a[7]<<a[8]<<a[9]<<a\
[10]<<a[11]<<'\n';
}#include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
cout<<a[0]<<a[1]<<a[2]<<a[3]<<a[4]<<' '<<a[5]<<a[6]<<a[7]<<a[8]<... | a.cc:8:2: error: stray '#' in program
8 | }#include<bits/stdc++.h>
| ^
a.cc:8:3: error: 'include' does not name a type
8 | }#include<bits/stdc++.h>
| ^~~~~~~
a.cc:10:5: error: redefinition of 'int main()'
10 | int main(){
| ^~~~
a.cc:3:5: note: 'int main()' previously defined here
... |
s966375947 | p03992 | Java | import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String s=sc.next();
System.out.println(s.subString(0,4)+" "+s.subString(4,12));
}
} | Main.java:7: error: cannot find symbol
System.out.println(s.subString(0,4)+" "+s.subString(4,12));
^
symbol: method subString(int,int)
location: variable s of type String
Main.java:7: error: cannot find symbol
System.out.println(s.subString(0,4)+" "+s.subString(4,12));
... |
s129636956 | p03992 | Java | import java.util.*;
class Main{
public static void main(tring args[]){
Scanner sc = new Scanner(System.in);
String s=sc.next();
System.out.println(s.subString(0,4)+" "+s.subString(4,12));
}
} | Main.java:4: error: cannot find symbol
public static void main(tring args[]){
^
symbol: class tring
location: class Main
Main.java:7: error: cannot find symbol
System.out.println(s.subString(0,4)+" "+s.subString(4,12));
^
symbol: method subString(int,int... |
s724160343 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
for (int i = 0;i < 4; i++)
cout << i[s];
cout << " ";
for (int i = 4;i < s.length();i++)
cout << s[i];
cout << endl;
} | a.cc: In function 'int main()':
a.cc:10:14: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
10 | cout << i[s];
| ^
|
s910885158 | p03992 | C++ | #include<iostream>
using namespace std;
inr main(){
string str;
cin >> str;
for(int i=0;i<12;i++){
cout << str[i];
if(i==3) cout << ' ';
}
cout << endl;
} | a.cc:3:1: error: 'inr' does not name a type; did you mean 'int'?
3 | inr main(){
| ^~~
| int
|
s951912369 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
for(int i = 0; i < a.aize(); i++){
cout << a.at(i);
if(i == 3)
cout << ' ';
else if(i == a.size() - 1)
cout << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'aize'; did you mean 'size'?
7 | for(int i = 0; i < a.aize(); i++){
| ^~~~
| size
|
s685259612 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string str1"1234", str2, str3"12345678";
str2 = " ";
for (int i = 0; i < 4; i++) {
str1.at(i) = s.at(i);
}
for (int i = 0; i < 8; i++) {
str3.at(i) = s.at(i + 4);
}
cout << str1 << str2 << str3 << endl;
}
| a.cc: In function 'int main()':
a.cc:7:14: error: expected initializer before string constant
7 | string str1"1234", str2, str3"12345678";
| ^~~~~~
a.cc:8:3: error: 'str2' was not declared in this scope
8 | str2 = " ";
| ^~~~
a.cc:10:5: error: 'str1' was not declared in this scope... |
s241424449 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string str1(1234), str2, str3(12345678);
str2 = " ";
for (int i = 0; i < 4; i++) {
str1.at(i) = s.at(i);
}
for (int i = 0; i < 8; i++) {
str3.at(i) = s.at(i + 4);
}
cout << str1 << str2 << str3 << endl;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
7 | string str1(1234), str2, str3(12345678);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52... |
s780181280 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string str1(1234), str2(1), str3(12345678);
str2 = " ";
for (int i = 0; i < 4; i++) {
str1.at(i) = s.at(i);
}
for (int i = 0; i < 8; i++) {
str3.at(i) = s.at(i + 4);
}
cout << str1 << str2 << str3 << endl;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
7 | string str1(1234), str2(1), str3(12345678);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset... |
s603195003 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
string str1(4), str2(1), str3(8);
str2 = " ";
for (int i = 0; i < 4; i++) {
str1.at(i) = s.at(i);
}
for (int i = 0; i < 8; i++) {
str3.at(i) = s.at(i + 4);
}
cout << str1 << str2 << str3 << endl;
} | a.cc: In function 'int main()':
a.cc:7:16: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
7 | string str1(4), str2(1), str3(8);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
... |
s698640958 | p03992 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string s; cin >> s;
for(int i=0; i<s.length(); i++){
cout << s[i]
if(i == 3){cout << " ";}
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'if'
8 | cout << s[i]
| ^
| ;
9 | if(i == 3){cout << " ";}
| ~~
|
s283053706 | p03992 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<vector<int>> vvi;
ll gcd(ll a,ll b){
if (a%b==0) return(b);
else return(gcd(b,a%b));
}
ll lcm(ll a,ll b){
return a*b/gcd(a,b);
}
vector<int> bfs(vvi L,int S){
vec... | a.cc: In function 'int main()':
a.cc:45:7: error: expected unqualified-id before numeric constant
45 | rep(1,4) cout << S[i];
| ^
a.cc:2:26: note: in definition of macro 'rep'
2 | #define rep(i,n) for(int i=0;i<n;i++)
| ^
a.cc:45:7: error: expected ';' before numeric ... |
s942519158 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin >> a;
a.insert(4, ' ');
cout << a << endl;
} | a.cc: In function 'int main()':
a.cc:6:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)'
6 | a.insert(4, ' ');
| ~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from ... |
s416177151 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char a;
for (int i = 0; i < 13; i++) {
if (i == 4) {
cout << ' ';
} else {
cin >> a;
cout << a;
}
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s537083384 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin >> a;
for (int i == 12; i > 6; i++) {
a[i] = a[i - 1];
}
a[4] = ' ';
cout << a;
} | a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before '==' token
6 | for (int i == 12; i > 6; i++) {
| ^~~
| ;
a.cc:6:14: error: expected primary-expression before '==' token
6 | for (int i == 12; i > 6; i++) {
| ^~
a.cc:6:26: error: exp... |
s518820281 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin >> a;
for (int i == 12; i < 6; i++) {
a[i] = a[i - 1];
}
a[4] = ' ';
cout << a;
} | a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before '==' token
6 | for (int i == 12; i < 6; i++) {
| ^~~
| ;
a.cc:6:14: error: expected primary-expression before '==' token
6 | for (int i == 12; i < 6; i++) {
| ^~
a.cc:6:26: error: exp... |
s485335472 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
string s1[4],s2[8];
cin>>s1>>s2;
cout<<s1<<" "<<s2<<endl;
} | a.cc: In function 'int main()':
a.cc:7:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'})
7 | cin>>s1>>s2;
| ~~~^~~~
| | |
| | std::string [4] {aka std::__cxx11::ba... |
s673605349 | p03992 | Java | s=input();print(s[:4]+" "+s[4:]) | Main.java:1: error: class, interface, enum, or record expected
s=input();print(s[:4]+" "+s[4:])
^
Main.java:1: error: class, interface, enum, or record expected
s=input();print(s[:4]+" "+s[4:])
^
2 errors
|
s397850985 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
for(int i=0;i<a.size();i++){
cout<<a[i];
if(i==3){
cout<<" "
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before '}' token
10 | cout<<" "
| ^
| ;
11 | }
| ~
|
s535169062 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
for(int i=0;i<a.size();i++)
cout<<a[i];
if(i==3){
cout<<" "
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:9:6: error: 'i' was not declared in this scope
9 | if(i==3){
| ^
a.cc:10:12: error: expected ';' before '}' token
10 | cout<<" "
| ^
| ;
11 | }
| ~
a.cc: At global scope:
a.cc:13:9: error: 'cout' does not ... |
s323645200 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
for(i=0;i<a.size();i++)
cout<<a[i];
if(i==3){
cout<<" "
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
7 | for(i=0;i<a.size();i++)
| ^
a.cc:9:6: error: 'i' was not declared in this scope
9 | if(i==3){
| ^
a.cc:10:12: error: expected ';' before '}' token
10 | cout<<" "
| ^
| ... |
s443983486 | p03992 | C++ | #include <cstdio>
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
int main()
{
string s;
cin >> s;
for (int i = 0; i < 12; i++) {
cout << s.at[i];
if (i == 3) cout << " ";
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:15:29: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
15 | cout << s.at[i];
| ^
|
s092564130 | p03992 | C++ | s = gets.chomp
puts (s[0...4] + ' ' + s[4..-1]) | a.cc:2:9: error: too many decimal points in number
2 | puts (s[0...4] + ' ' + s[4..-1])
| ^~~~~
a.cc:2:26: error: too many decimal points in number
2 | puts (s[0...4] + ' ' + s[4..-1])
| ^~~
a.cc:1:1: error: 's' does not name a type
1 | s = gets.chomp
| ^
|
s831896871 | p03992 | C++ | #include <stdio.h>
int main(void){
char s[25];
scanf("%s",s);
for(count=11;count!=4;count--){
s[count+1]=s[count];
}
s[4]=' ';
printf("%s",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:7: error: 'count' was not declared in this scope
5 | for(count=11;count!=4;count--){
| ^~~~~
|
s560147472 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
// gcd(a,b)
int gcd(int a,int b){
(b == 0) ? gcd(b, a % b) : (return a);
}
// lcm(a,b)
int lcm(int a,int b){
return (a * b) / gcd(a,b);
}
int main(int argc, char const *argv[])
{
string str;
cin >> str;
for (int i = 0; i < 12; i ++){
cout << str[i];
if (i == 3) ... | a.cc: In function 'int gcd(int, int)':
a.cc:6:37: error: expected primary-expression before 'return'
6 | (b == 0) ? gcd(b, a % b) : (return a);
| ^~~~~~
a.cc:6:37: error: expected ')' before 'return'
6 | (b == 0) ? gcd(b, a % b) : (return a);
| ... |
s399274266 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
// gcd(a,b)
int gcd(int a,int b){
(b == 0) ? (return a) : gcd(b, a % b);
}
// lcm(a,b)
int lcm(int a,int b){
return (a * b) / gcd(a,b);
}
int main(int argc, char const *argv[])
{
for (int i = 0; i < 12; i ++){
cout << s[i];
if (i == 3) cout << " ";
}
return 0;
}... | a.cc: In function 'int gcd(int, int)':
a.cc:6:21: error: expected primary-expression before 'return'
6 | (b == 0) ? (return a) : gcd(b, a % b);
| ^~~~~~
a.cc:6:21: error: expected ')' before 'return'
6 | (b == 0) ? (return a) : gcd(b, a % b);
| ... |
s719856986 | p03992 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
int main(int argc, char const *argv[])
{
char str[17];
scanf("%s",str);
for (int i = 0; i < strlen(s) + 1; ++i)
{
if(i < 4) printf("%c", str[i]);
else if(i ==... | main.c: In function 'main':
main.c:14:36: error: 's' undeclared (first use in this function)
14 | for (int i = 0; i < strlen(s) + 1; ++i)
| ^
main.c:14:36: note: each undeclared identifier is reported only once for each function it appears in
|
s161524186 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;cin>>s;
cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl;
} | a.cc: In function 'int main()':
a.cc:5:25: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
5 | cout<<s.substr(s.begin(),4)<<" "<<s.substr(s.begin()+4,8)<<endl;
| ~~~~~~~^~
| ... |
s781242072 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin>>S;
rep(i,S.size()){
if(i==4)cout<<' ';
cout<<S[i];
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
7 | rep(i,S.size()){
| ^
a.cc:7:9: error: 'rep' was not declared in this scope
7 | rep(i,S.size()){
| ^~~
|
s751247492 | p03992 | C++ | #include<algorithm>
#include<iostream>
#include<functional>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
char s[16];
for(int i=0;i<12;i++){
cin>>s[i];
char a=s[i]
cout<<a;
if(i==3)
cout<<" ";
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'cout'
12 | cout<<a;
| ^~~~
|
s725422532 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
s.insert(4,' ');
cout<<s<<endl;
} | a.cc: In function 'int main()':
a.cc:6:11: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, char)'
6 | s.insert(4,' ');
| ~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /u... |
s106044123 | p03992 | C++ | import java.util.*;
class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String s = sc.next();
char[] c = s.toCharArray();
String s2="";
for(int i=0;i<4;i++) {
s2+=c[i];
}
s2+=" ";
for... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:12: error: expected ':' before 'static'
6 | private static Scanner sc = new Scanner(System.in);
| ^~~~~~~
| :
a.cc:... |
s513345403 | p03992 | C | #include <stdio.h>
int main()
{
int i;
char a[12];
scanf("%s,a);
for(i=0;i<=3;i++)
{
printf("%c",a[i]);
}
printf(" ");
for(i=4;i<strlen(a);i++)
{
printf("%c",a[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:7:10: warning: missing terminating " character
7 | scanf("%s,a);
| ^
main.c:7:10: error: missing terminating " character
7 | scanf("%s,a);
| ^~~~~~~
main.c:8:5: error: expected expression before 'for'
8 | for(i=0;i<=3;i++)
| ... |
s837021462 | p03992 | C++ | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>. | a.cc:1:1: error: expected unqualified-id before ',' token
1 | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>.
| ^
a.cc:1:2: error: expected unqualified-id before '.' token
1 | ,.,.,.,.>++++[>++++++++<-]>.,.,.,.,.,.,.,.,.>++++[>++++++++<-]>.
| ^
|
s579375695 | p03992 | C++ | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,. | a.cc:1:1: error: expected unqualified-id before ',' token
1 | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,.
| ^
a.cc:1:2: error: expected unqualified-id before '.' token
1 | ,.,.,.,.>++++[>++++++++<-]<....,.,.,.,.,.,.,.,.
| ^
|
s796371334 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c='';
for(int i=0;i<13;i++){
if(i==3)
c=' ';
else
cin<<c;
cout<<c;
}
cout<<endl;
} | a.cc:4:10: error: empty character constant
4 | char c='';
| ^~
a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
9 | cin<<c;
| ~~~^~~
| | |
| | ... |
s533370665 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
char c;
for(int i=0;i<13;i++){
if(i==3)
c=' ';
else
cin<<c;
cout<<c;
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:9:10: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char')
9 | cin<<c;
| ~~~^~~
| | |
| | char
| std::istream {aka std::basic_istream<char>}
a.cc:9:10: note: ca... |
s632035369 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
for(int i=0;i<=s.size();i++){
if(i==4){
cout<<" ";
continue;
}
if(i<=3){
cout<<s[i];
}else{
cout<<s[ii1];
}
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:15:15: error: 'ii1' was not declared in this scope
15 | cout<<s[ii1];
| ^~~
|
s846041329 | p03992 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
for(i=0;i<=3;i++)
cout<<s[i];
cout<<' ';
for(i=4;i<s.size();i++)
cout<<s[i];
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'i' was not declared in this scope
6 | for(i=0;i<=3;i++)
| ^
a.cc:9:9: error: 'i' was not declared in this scope
9 | for(i=4;i<s.size();i++)
| ^
|
s992518250 | p03992 | C++ | #include<iostream>
using namespace std;
string s;
int main()
{
cin>>s;
cout<<s[0]<<s[1]<<s[2]<<s[3]<<" "<<s[4]<<s[5]<<s[6]<<s[7]<<s[8]<<s[9]<<s[10]<<s[11];
return 0;
} | a.cc: In function 'int main()':
a.cc:6:10: error: 's\U0000ff1b' was not declared in this scope
6 | cin>>s;
| ^~~
|
s848312314 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
s = s.Insert(4," ");
cout << s << endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Insert'; did you mean 'insert'?
7 | s = s.Insert(4," ");
| ^~~~~~
| insert
|
s095654727 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
cout << s.Insert(4," ") << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'Insert'; did you mean 'insert'?
7 | cout << s.Insert(4," ") << endl;
| ^~~~~~
| insert
|
s548207567 | p03992 | C++ | ,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,. | a.cc:1:1: error: expected unqualified-id before ',' token
1 | ,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,.
| ^
a.cc:1:2: error: expected unqualified-id before '.' token
1 | ,.,.,.,.>++++++++++++++++++++++++++++++++.,.,.,.,.,.,.,.,.
| ^
|
s465238692 | p03992 | C++ | #include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
using namespace std;
typedef long long l... | a.cc: In function 'int main()':
a.cc:41:35: error: 'substr' was not declared in this scope
41 | cout<<S.substr(0,3)<<" "<<substr(4,11)<<endl;
| ^~~~~~
|
s501554180 | p03992 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s; cin >> s;
for (int i = 0; i < 12; i++) {
cout >> s[i];
if (i == 3) cout >> ' ';
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:6:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
6 | cout >> s[i];
a.cc:6:10: note: candidate: 'operator>>(int, int)' (built-in)
a.c... |
s487981854 | p03992 | C++ | s = input();
ans = s[0:4]
ans += " "
ans += (s[4::])
print(ans) | a.cc:1:1: error: 's' does not name a type
1 | s = input();
| ^
a.cc:2:1: error: 'ans' does not name a type
2 | ans = s[0:4]
| ^~~
|
s956287163 | p03992 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<string>
#include<sstream>
#include<iomanip>
#include<utility>
#include<cmath>
#include<set>
#include<list>
#include<queue>
#include<stack>
#include<deque>
#include<map>
#include<set>
#include<cstring>
#include<iterator>
... | a.cc: In function 'int main()':
a.cc:64:19: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
64 | REP(i,4) cout >> s[i];
a.cc:64:19: note: candidate: 'operator>>(int, int)' (bu... |
s708637942 | p03992 | C++ | #include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;
#define MOD 1000000007
#define ll long long
#define ld long double
#define... | a.cc: In function 'int main()':
a.cc:30:13: error: expected primary-expression before '<' token
30 | string s = <string>in();
| ^
a.cc:30:20: error: expected primary-expression before '>' token
30 | string s = <string>in();
| ^
|
s304755207 | p03992 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String before = sc.next();
for (int i = 0; i < 12; i++) {
System.out.print(before.charAt(i));
if (i == 3) {
System.out.print(' ');
}
... | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s743611126 | p03992 | C | #include <stdio.h>
String main(String *lst){
String lst_[15];
int i;
for(i =0; i++; i<4){
lst_[i] = lst[i];
}
lst_[4] = " ";
for(i =5; i++; i<12){
lst_[i] = lst[i];
}
lst_[12] = "¥n";
return *lst_;
} | main.c:3:1: error: unknown type name 'String'
3 | String main(String *lst){
| ^~~~~~
main.c:3:13: error: unknown type name 'String'
3 | String main(String *lst){
| ^~~~~~
|
s554711306 | p03992 | C | #include <stdio.h>
String main(String *lst){
String lst_[15];
int i;
for(i =0; i++; i<4){
lst_[i] = lst[i];
}
lst_[4] = " ";
for(i =5; i++; i<12){
lst_[i] = lst[i];
}
lst_[12] = "¥n";
return *lst_; | main.c:3:1: error: unknown type name 'String'
3 | String main(String *lst){
| ^~~~~~
main.c:3:13: error: unknown type name 'String'
3 | String main(String *lst){
| ^~~~~~
|
s013483283 | p03992 | C++ | #include "IntMod.h"
typedef IntMod<1000000007> MInt;
//#include "Union_Find.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <utility>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stack>
#include <queue... | a.cc:1:10: fatal error: IntMod.h: No such file or directory
1 | #include "IntMod.h"
| ^~~~~~~~~~
compilation terminated.
|
s606131527 | p03992 | C++ | #include <iostream>
int main(){
for(int i = 0; i < 12; i++){
char c;
cin >> c;
cout << c;
if(i == 3){
cout << " ";
}
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked ... |
s708977957 | p03992 | C++ | #include <iostream>
int mains(){
for(int i = 0; i < 12; i++){
char c;
cin >> c;
cout << c;
if(i == 3){
cout << " ";
}
}
cout << endl;
return 0;
}
| a.cc: In function 'int mains()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> c;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard... |
s166242842 | p03992 | C++ | #include<iostream>
using namespace std;
int main(){
int a[4],b[8];
cin >> a[4] >>b[8];
cout << a[4] <<" " << b[8];
return0;
} | a.cc: In function 'int main()':
a.cc:8:1: error: 'return0' was not declared in this scope
8 | return0;
| ^~~~~~~
|
s284078954 | p03992 | C++ | gh | a.cc:1:1: error: 'gh' does not name a type
1 | gh
| ^~
|
s136824686 | p03992 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
int[] arr = new int[a];
for (int i = 0; i < a; i++) {
arr[i] = sc.nextInt();
}
... | Main.java:12: error: cannot find symbol
if (arr[arr[i]] == i) {
^
symbol: variable i
location: class Main
Main.java:12: error: cannot find symbol
if (arr[arr[i]] == i) {
^
symbol: variable i
location: class Main
2... |
s840174767 | p03992 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// get a integer
int a = sc.nextInt();
int[] arr = new int[a];
for (int i = 0; i < a; i++) {
a[i] = sc.nextInt();
}
... | Main.java:9: error: array required, but int found
a[i] = sc.nextInt();
^
Main.java:12: error: cannot find symbol
if (a[a[i]] == i) {
^
symbol: variable i
location: class Main
Main.java:12: error: array required, but int found
... |
s850627765 | p03992 | C++ | #include<iostream>
using namespace std;
int main()
{
string s;
cin >> s
cout << s.substr(0,4) << ' ' << s.substr(4, 8);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:11: error: expected ';' before 'cout'
7 | cin >> s
| ^
| ;
8 | cout << s.substr(0,4) << ' ' << s.substr(4, 8);
| ~~~~
|
s492145628 | p03992 | Java | public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s=sc.next();
s=s.substring(0,4)+" "+s.substring(4,12);
System.out.println(s);
}
} | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s998251734 | p03992 | C++ | string s;
cin >> s;
cout << s.substr(0, 4) + " " + s.substr(4);
| a.cc:1:1: error: 'string' does not name a type
1 | string s;
| ^~~~~~
a.cc:2:1: error: 'cin' does not name a type
2 | cin >> s;
| ^~~
a.cc:3:1: error: 'cout' does not name a type
3 | cout << s.substr(0, 4) + " " + s.substr(4);
| ^~~~
|
s104437933 | p03992 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[]){
cout << taskA(string(argv[0]));
}
string taskA(string s) {
return s.substr(0, 4) + " " + s.substr(4);
} | a.cc: In function 'int main(int, char**)':
a.cc:6:17: error: 'taskA' was not declared in this scope
6 | cout << taskA(string(argv[0]));
| ^~~~~
|
s502371179 | p03992 | C | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);} | main.c: In function 'main':
main.c:1:26: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
1 | int main(){char str[14]; gets(str); for(size_t i=13; i>4;i--){str[i] = str[i-1];} str[4] = ' '; puts(str);}
| ^~~~
main.c:1:41: error: unknown type name 'size_... |
s516536335 | p03992 | C++ | int main() {
string a;
cin >> a;
rep(i, 4)
cout << a[i];
cout << " ";
rep(i, 8)
cout << a[i + 4];
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
2 | string a;
| ^~~~~~
a.cc:3:9: error: 'cin' was not declared in this scope
3 | cin >> a;
| ^~~
a.cc:3:16: error: 'a' was not declared in this scope
3 | cin >> a;
... |
s262134092 | p03992 | C++ | #include <bits/stdc++.h>
int main()
{string s;
cin>>s;
cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:2: error: 'string' was not declared in this scope
4 | {string s;
| ^~~~~~
a.cc:4:2: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gn... |
s335325660 | p03992 | C++ | #include <bits/stdc++.h>
int main()
{ string s;
cin>> s;
cout<<s.substr(0,4)<<" "<<s.substr(4,8)<<endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
4 | { string s;
| ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-... |
s616278398 | p03992 | C++ |
int main(){
char *str = new char[10001];
int count;
scanf("%s", str);
scanf("%d", &count);
size_t str_len = strlen(str);
int idx = 0;
while(count > 0){
int sub_a = static_cast<int>(str[idx]) - 97;
int next2a = 123 - static_cast<int>(str[idx]);
... | a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
5 | scanf("%s", str);
| ^~~~~
a.cc:8:5: error: 'size_t' was not declared in this scope
8 | size_t str_len = strlen(str);
| ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is... |
s612174180 | p03992 | C++ |
#include <iostream>
#include <string>
using namespace std;
int main(){
char *str = new char[10000];
int count;
scanf("%s", str);
scanf("%d", &count);
size_t str_len = strlen(str);
int idx = 0;
while(count > 0){
int sub_a = static_cast<int>(str[idx] - 97);
... | a.cc: In function 'int main()':
a.cc:13:22: error: 'strlen' was not declared in this scope
13 | size_t str_len = strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
+++ |+... |
s791253964 | p03992 | C++ | include <stdio.h>
int main(){
// get size
int number;
scanf("%d", &number);
int *likes = new int[number];
for(int i = 0; i < number; i++){
scanf("%d", &likes[i]);
}
int pairs = 0;
for(int i = 0; i < number; i++){
int r1 = i+1;
int r1_likes = likes... | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
|
s354757274 | p03992 | C++ | #include <stdioi.h>
int main(){
// get size
int number;
scanf("%d", &number);
int *likes = new int[number];
for(int i = 0; i < number; i++){
scanf("%d", &likes[i]);
}
int pairs = 0;
for(int i = 0; i < number; i++){
int r1 = i+1;
int r1_likes = lik... | a.cc:1:10: fatal error: stdioi.h: No such file or directory
1 | #include <stdioi.h>
| ^~~~~~~~~~
compilation terminated.
|
s412352011 | p03992 | C++ | #include<iostream>
using namespace std;
ios::sync_with_stdio(false);
int main(void){
string s;
cin >> s;
cout << s.substr(0,4) << " " << s.substr(4,8) << endl;
return 0;
} | a.cc:3:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
3 | ios::sync_with_stdio(false);
| ^~~
|
s874410035 | p03992 | C++ |
#include <iostream>
#include <cstdio>
#define rep(i, n) fr(i, 0, n)
int main() {
string s;
cin >>s;
rep(i, 4)cout<<s[i];
cout<<" ";
rep(i, 8)cout<<s[i+4];
cout<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
6 | string s;
| ^~~~~~
a.cc:6:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostre... |
s806174367 | p03992 | C++ |
#include<iostream>
using namespace std;
int main
{
string S;
cin>>S;
for(int i=0;i<12;i++)
{
if (i==4) cout<<' ';
cout<<S[i];
}
return 0;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main
| ^~~~
a.cc:6:8: error: expected primary-expression before 'S'
6 | string S;
| ^
a.cc:6:8: error: expected '}' before 'S'
a.cc:5:1: note: to match this '{'
5 | {
| ^
a.cc:7:1: error: 'cin' does not nam... |
s407217754 | p03992 | C++ |
#include<iostream>
#include<string.h>
using namespace std;
int main
{
char S[13];
cin.getline(S,12);
for(int i=12;i>=4;i--)
{
S[i]=S[i-1];
}
S[4]=' ';
cout<<S;
return 0;
} | a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main
| ^~~~
a.cc:7:1: error: expected primary-expression before 'char'
7 | char S[13];
| ^~~~
a.cc:7:1: error: expected '}' before 'char'
a.cc:6:1: note: to match this '{'
6 | {
| ^
a.cc:8:1: error: 'cin' does not... |
s936479247 | p03992 | C++ |
#include<iostream>
#include<string.h>
using namespace std;
int main
{
char str[51];
cin.getline(str,49);
for(int i=50;i>=4;i--)
{
str[i]=str[i-1];
}
str[4]=' ';
} | a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main
| ^~~~
a.cc:7:1: error: expected primary-expression before 'char'
7 | char str[51];
| ^~~~
a.cc:7:1: error: expected '}' before 'char'
a.cc:6:1: note: to match this '{'
6 | {
| ^
a.cc:8:1: error: 'cin' does n... |
s322002571 | p03992 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main
{
char srt[51];
cin.getline(str,49);
for(int i=50;i>=4;i--)
{
str[i]=str[i-1];
}
str[4]=' ';
}
| a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main
| ^~~~
a.cc:6:1: error: expected primary-expression before 'char'
6 | char srt[51];
| ^~~~
a.cc:6:1: error: expected '}' before 'char'
a.cc:5:1: note: to match this '{'
5 | {
| ^
a.cc:7:1: error: 'cin' does n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.