submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s773238625 | p00101 | C++ | //#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010
using namespace std;
int main(){
int n;
cin >> n;
// cout << n << endl;
int j;
bool checking = true;
for( j = 0; j<=n; j++)
{
checking = true;
char s[MAX_SIZE] = {};
get... | a.cc: In function 'int main()':
a.cc:20:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
20 | gets(s);
| ^~~~
| getw
|
s802766795 | p00101 | C++ | //#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#include <stdio.h>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010
using namespace std;
int main(){
int n;
cin >> n;
// cout << n << endl;
int j;
bool checking = true;
for( j = 0; j<=n; j++)
{
checking = true;
char s[MA... | a.cc: In function 'int main()':
a.cc:21:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
21 | gets(s);
| ^~~~
| getw
|
s841253359 | p00101 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vec... | a.cc: In function 'int main()':
a.cc:44:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
44 | gets(s);
| ^~~~
| getw
|
s078688754 | p00101 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vec... | a.cc: In function 'int main()':
a.cc:44:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
44 | gets(s);
| ^~~~
| getw
|
s259906701 | p00101 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
int n;
char str[1000];
scanf("%d", &n);
for (int i = 0; i < n+1; i++) {
gets(str);
if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
printf("%s\n", str);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str);
| ^~~~
| getw
|
s235812577 | p00101 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
int n;
char str[1001];
scanf("%d\n", &n);
for (int i = 0; i < n; i++) {
gets(str);
while (1) {
if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
else break;
}
puts(str);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str);
| ^~~~
| getw
|
s975571261 | p00101 | C++ | #include <stdio.h>
#include <string.h>
int main(void) {
int i,j;
int n = 0;
char strsent[50][1000] = { 0 };
char work[1000] = { 0 };
scanf("%d", &n);
getchar();
for(i = 0; i < n; i++) {
// ???????????\???
gets(strsent[i]);
}
for(i = 0; i < n; i++) {
for(j = 0; strsent[i][j] != '\0'; j++){
// null????... | a.cc: In function 'int main()':
a.cc:13:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(strsent[i]);
| ^~~~
| getw
|
s750708193 | p00101 | C++ | #include <stdio.h>
#include <string.h>
int main(void) {
int i,j;
int n = 0;
char strsent[50][1000] = { 0 };
char work[1000] = { 0 };
scanf("%d", &n);
getchar();
for(i = 0; i < n; i++) {
// ???????????\???
gets(strsent[i]);
}
for(i = 0; i < n; i++) {
for(j = 0; strsent[i][j] != '\0'; j++){
// null????... | a.cc: In function 'int main()':
a.cc:13:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(strsent[i]);
| ^~~~
| getw
|
s512276138 | p00101 | C++ | #include <iostream>
int main(){
int data_set_num;
std::string str;
std::string from = "Hoshino";
std::string to = "Hoshina";
std::cin >> data_set_num;
while(data_set_num--){
std::getline(cin,str);
string::size_type pos = str.find(from);
while(pos != string::npos){
... | a.cc: In function 'int main()':
a.cc:12:22: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
12 | std::getline(cin,str);
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here... |
s358236450 | p00101 | C++ | #include <iostream>
#include <string>
#include <fstream>
int main(){
int data_set_num;
std::string str;
std::string from = "Hoshino";
std::string to = "Hoshina";
cin >> data_set_num;
//std::getline(std::cin,str);
//sscanf(str.c_str(),"%d ",&data_set_num);
while(data_set_num--){
... | a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
11 | cin >> data_set_num;
| ^~~
| 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; ... |
s503077140 | p00101 | C++ | #include <iostream>
#include <string>
#include <fstream>
int main(){
int data_set_num;
std::string str;
std::string from = "Hoshino";
std::string to = "Hoshina";
std::cin >> data_set_num;
std::cin.ignore();
while(data_set_num--){
std::getline(std::cin,str);
std::string::u_... | a.cc: In function 'int main()':
a.cc:16:22: error: 'u_int' is not a member of 'std::string' {aka 'std::__cxx11::basic_string<char>'}
16 | std::string::u_int pos = str.find(from);
| ^~~~~
a.cc:17:15: error: 'pos' was not declared in this scope
17 | while(pos != std::strin... |
s567955130 | p00101 | C++ | #include <iostream>
#include <string>
#include <fstream>
int main(){
int data_set_num;
std::string str;
std::string from = "Hoshino";
std::string to = "Hoshina";
std::cin >> data_set_num;
std::cin.ignore();
while(data_set_num--){
std::getline(std::cin,str);
std::string::si... | a.cc: In function 'int main()':
a.cc:16:22: 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 =... |
s814089534 | p00101 | C++ | #include <iostream>
#include <sstream>
#include <vector>
int main(void){
std::string tmp;
u_int n; //number of data set
std::cin >> n; //input number of data set
std::cin.ignore(); //delete cin buffer
for(size_t i = 0; i < n; ++i){
std::vector<std::string> str; //string data
std::string buf;
std::string l... | a.cc: In function 'int main()':
a.cc:23:34: error: 'tmo' was not declared in this scope; did you mean 'tmp'?
23 | }else if(tmo == "Hoshino."){
| ^~~
| tmp
|
s456489695 | p00101 | C++ | import string
n=int(input())
for i in range(n):
print(input().replace("Hoshino", "Hoshina")) | a.cc:1:1: error: 'import' does not name a type
1 | import string
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s268086219 | p00101 | C++ |
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include <sstream>
#include <vector>
int main(void){
int n; //number of data set
std::cin >> n; //input number of data set
std::cin.ignore(); //delete cin buffer
... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 2
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a... |
s516849024 | p00101 | C++ | #include <iostream>
#include <sstream>
#include <vector>
int main(void){
int n; //number of data set
std::cin >> n; //input number of data set
std::cin.ignore(); //delete cin buffer
for(size_t i = 0; i < n; ++i){
std::vector<std::string> str; //string data
std::string line; //outpu... | a.cc: In function 'int main()':
a.cc:29:86: error: 'std::vector<std::__cxx11::basic_string<char> >::iterator' has no member named 'next'
29 | for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); it.next()){
| ... |
s724929413 | p00101 | C++ | n=int(input())
for i in range(n):
s=input()
for i in range(len(s)-7):
if s[i:i+6]=='Hoshino':
s[i+6]='a' | a.cc:5:22: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
5 | if s[i:i+6]=='Hoshino':
| ^~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
1 | n=int(input())
| ^
|
s224173160 | p00101 | C++ | using System;
namespace TestProject
{
class MainClass
{
public static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
string s0 = "Hoshino";
string s1 = "Hoshina";
string[] s = new string[n];
for (int i = 0; i < n; i++)
{
s[i] = Console.ReadLine();
s[i] = s[i].Replace(... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:7:23: error: expected ':' before 'static'
7 | public static void Main(string[] args)
| ^~~~~~~
| :
a.cc:7:41: error: 'string' has no... |
s828144151 | p00101 | C++ | #include<stdio.h>
#include<string.h>
int main(){
char s[2000];
int n, i, j, key = 0;
scanf("%c", &n);
while( n-- ) {
gets(s);
for ( i = 0; i < strlen(s); i++ ) {
if ( s[i] == 'H' ) {
if ( s[i+1] == 'o' && s[i+2] == 's' && s[i+3] == 'h' && s[i+4] == 'i' && s[i+... | a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(s);
| ^~~~
| getw
|
s794953904 | p00101 | C++ | #include <iostream>
#include <array>
#include <string>
int main(){
int n;
int i = 0;
int flag = 0;
std::array<std::string, 1000> str = {};
std::cin >> n;
while(n > 0){
while(std::cin >> str[i]){
++flag;
++i;
}
for(int j = 0;j < flag;++j){
if(str[j] == "Hoshino")
... | a.cc: In function 'int main()':
a.cc:25:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
25 | std::cout << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/... |
s418940474 | p00101 | C++ | #include <iostream>
#include <array>
#include <string>
int main(){
int n;
int i = 0;
int flag = 0;
std::array<std::string, 1000> str = {};
std::cin >> n;
while(n > 0){
while(std::cin >> str[i]){
++flag;
++i;
}
for(int j = 0;j < flag;++j){
if(str[j] == "Hoshino")
... | a.cc: In function 'int main()':
a.cc:25:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
25 | std::cout << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/... |
s433040277 | p00101 | C++ | #include <iostream>
#include <array>
#include <string>
int main(){
int n;
int i = 0;
int flag = 0;
std::array<std::string, 1000> str = {};
std::cin >> n;
while(n > 0){
while(std::cin >> str[i]){
++flag;
++i;
}
for(int j = 0;j < flag;++j){
if(str[j] == "Hoshino")
... | a.cc: In function 'int main()':
a.cc:25:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
25 | std::cout << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/... |
s455735885 | p00101 | C++ | #include <iostream>
#include <string>
std::string false = "Hoshino";
std::string true = "Hoshina";
int main(){
int num;
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.lemgth();j++){
if(english[j]==false) english[j]=true;
}
}
return 0;
}
| a.cc:4:13: error: expected unqualified-id before 'false'
4 | std::string false = "Hoshino";
| ^~~~~
a.cc:5:13: error: expected unqualified-id before 'true'
5 | std::string true = "Hoshina";
| ^~~~
a.cc: In function 'int main()':
a.cc:14:39: error: 'std::string' {aka 'class st... |
s779661767 | p00101 | C++ | #include <iostream>
#include <string>
std::string false = "Hoshino";
std::string true = "Hoshina";
int main(){
int num;
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.lemgth();j++){
if(english[j]==false) english[j]=true;
}
std::cout << english;... | a.cc:4:13: error: expected unqualified-id before 'false'
4 | std::string false = "Hoshino";
| ^~~~~
a.cc:5:13: error: expected unqualified-id before 'true'
5 | std::string true = "Hoshina";
| ^~~~
a.cc: In function 'int main()':
a.cc:14:39: error: 'std::string' {aka 'class st... |
s723750851 | p00101 | C++ | #include <iostream>
#include <string>
std::string false = "Hoshino";
std::string true = "Hoshina";
int main(){
int num;
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.length();j++){
if(english[j]==false) english[j]=true;
}
std::cout << english;... | a.cc:4:13: error: expected unqualified-id before 'false'
4 | std::string false = "Hoshino";
| ^~~~~
a.cc:5:13: error: expected unqualified-id before 'true'
5 | std::string true = "Hoshina";
| ^~~~
|
s694428000 | p00101 | C++ | #include <iostream>
#include <string>
int main(){
int num;
std::string false = "Hoshino";
std::string true = "Hoshina";
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.length();j++){
if(english[j]==false) english[j]=true;
}
std::cout << english... | a.cc: In function 'int main()':
a.cc:6:21: error: expected unqualified-id before 'false'
6 | std::string false = "Hoshino";
| ^~~~~
a.cc:7:21: error: expected unqualified-id before 'true'
7 | std::string true = "Hoshina";
| ^~~~
|
s136384843 | p00101 | C++ | #include <iostream>
#include <string>
int main(){
int num;
std::string false;
std::string true;
std::string english;
std::cin >> num;
false = "Hoshino";
true = "Hoshina";
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.length();j++){
if(english[j]==false) english[j]=true;
}
std::... | a.cc: In function 'int main()':
a.cc:6:21: error: expected unqualified-id before 'false'
6 | std::string false;
| ^~~~~
a.cc:7:21: error: expected unqualified-id before 'true'
7 | std::string true;
| ^~~~
a.cc:11:17: error: lvalue required as l... |
s420725860 | p00101 | C++ | #include <iostream>
#include <string>
int main(){
int num;
std::string fa = "Hoshino";
std::string tr = "Hoshina";
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.length();j++){
if(english[j]==false){
if(english[j+7]==" "||english[j+7]=="\0")
... | a.cc: In function 'int main()':
a.cc:15:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | if(english[j+7]==" "||english[j+7]=="\0")
a.cc:15:67: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | ... |
s265807997 | p00101 | C++ | #include <iostream>
#include <string>
int main(){
int num;
std::string fa = "Hoshino";
std::string tr = "Hoshina";
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.length();j++){
if(english[j]==fa){
if(english[j+7]==" "||english[j+7]=="\0")
... | a.cc: In function 'int main()':
a.cc:14:38: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
14 | if(english[j]==fa){
In file included from /usr/incl... |
s148345154 | p00101 | C++ | #include <iostream>
#include <string>
int main(){
int num;
std::string fa = "Hoshino";
std::string tr = "Hoshina";
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
for(int j=0;j<english.length();j++){
if(english[j]==fa){
english[j]=tr;
}
}
std::cout << englis... | a.cc: In function 'int main()':
a.cc:14:38: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
14 | if(english[j]==fa){
In file included from /usr/incl... |
s331403185 | p00101 | C++ | #include <iostream>
#include <string>
int main(){
int num;
std::string english;
std::cin >> num;
for(int i=0;i<num;i++){
std::cin >> english;
while(english.find("Hoshino") != -1){
int find = str.find("Hoshino");
english.replace(find, find+6, "Hoshina");
}
std::cout << english;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:36: error: 'str' was not declared in this scope; did you mean 'std'?
12 | int find = str.find("Hoshino");
| ^~~
| std
|
s787753688 | p00101 | C++ | include <iostream>
#include <string>
using namespace std;
int main(void){
int line_length;
cin>>line_length;cin.ignore(2);
string input;
for(int i=0;i<line_length;++i){
getline(cin,input);
std::string::size_type pos;
while(( pos = input.find("Hoshino")) != std::string::npos){
input.replace... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a typ... |
s643393610 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
int line_length;
cin>>line_length;
getline(cin, str);
for(int i=0;i<line_length;++i){
string input;
getline(cin,input);
std::string::size_type pos;
while(( pos = input.find("Hoshino")) != std::string::npos){
inpu... | a.cc: In function 'int main()':
a.cc:9:16: error: 'str' was not declared in this scope; did you mean 'std'?
9 | getline(cin, str);
| ^~~
| std
|
s485968865 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
int line_length;
cin>>line_length;
getline(cin, str);
for(int i=0;i<line_length;++i){
string input;
getline(cin,input);
std::string::size_type pos;
while(( pos = input.find("Hoshino")) != std::string::npos){
inpu... | a.cc: In function 'int main()':
a.cc:9:16: error: 'str' was not declared in this scope; did you mean 'std'?
9 | getline(cin, str);
| ^~~
| std
|
s348592728 | p00101 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main(){
int n, j;
cin >> n;
char s[1001];
gets(s);
for (int i = 0; i < n; i++) {
//string s;
//cin >> s;
gets_s(s);
for (j = 0; j < 1000-6; j++) {
if (s[j + 6] == 0)
break;
if (s[j] == 'H'&&s[j + 1] == 'o'&&s[j + 2... | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
a.cc:14:17: error: 'gets_s' was not declared in this scope
14 | gets_s(s);
| ^~~~~~
|
s070292222 | p00101 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main(){
int n, j;
cin >> n;
char s[1001];
gets(s);
for (int i = 0; i < n; i++) {
//string s;
//cin >> s;
gets(s);
for (j = 0; j < 1000-6; j++) {
if (s[j + 6] == 0)
break;
if (s[j] == 'H'&&s[j + 1] == 'o'&&s[j + 2] ... | a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
|
s892322017 | p00101 | C++ | import java.util.*;
class Main{
public static void main(String args[]){
Scanner s=new Scanner (System.in);
int n=s.nextInt();
s.nextLine();
for(int j=0;j<n;j++){
char c[]=s.nextLine().toCharArray();
for(int i=0;i<c.length-6;i++){
if(c[i]=='H'&&c[i+1]=='o'&&c[i+2]=='s'&&c[i+3]=='h'&&c[i+4]=='i'&&c... | 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:4:15: error: expected ':' before 'static'
4 | public static void main(String args[]){
| ^~~~~~~
| :
a.cc:4:... |
s400890741 | p00101 | C++ | #include <stdio.h>
#include <string>
using namespace std;
int main(){
int n;
scanf("%d\n", &n);
int i;
for(i=0;i<n;i++){
char str[1000];
gets(str);
string s(str);
int index=0;
while((index=s.find("Hoshino", index)) != string::npos)
s.replace(index, 7, "Hoshina");
printf("%s\n", ... | a.cc: In function 'int main()':
a.cc:12:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(str);
| ^~~~
| getw
|
s757943170 | p00101 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
int n, i, j, k, c, x;
char s[1001], r[1001], t[8] = "Hoshino";
cin >> n;
cin.ignore(INT_MAX,'\n');
for (i = 0; i < n; i++)
{
cin.getline(s, sizeof(s));
c = 0;
for (j = 0; j < strlen(s); j++)
{
r[c] = s[j];
c++;
if (s[j] == '... | a.cc: In function 'int main()':
a.cc:9:20: error: 'INT_MAX' was not declared in this scope
9 | cin.ignore(INT_MAX,'\n');
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <cstring>
+++ |+#... |
s162104554 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void)
{
string str;
string::size_type index;
int num;
int number;
int i,j;
cin >> num;
getline(cin,str);//ツ催渉可づ個づ「ツづつつセツつッツ禿づ敖債楪づ慊つケ
for(i=0;i<num;i++)
{
getline(cin,str);
number = 0;
while((index = str.find("Hoshino") ) != string::np... | a.cc: In function 'int main()':
a.cc:26:18: error: expected '}' at end of input
26 | return 0;
| ^
a.cc:7:1: note: to match this '{'
7 | {
| ^
|
s981179344 | p00101 | C++ | #include<iostream>#include<string>using namespace std;int main(){char ch;int n;cin>>n;cin.get(ch);for(int i=0;i<n;i++){string str;while(1){cin.get(ch);if(ch=='\n')break;str+=ch;}while(1){int idx=str.find("Hoshino");if(idx==-1)break;str[idx+6]='a';}cout<<str<<endl;}return 0;} | a.cc:1:19: warning: extra tokens at end of #include directive
1 | #include<iostream>#include<string>using namespace std;int main(){char ch;int n;cin>>n;cin.get(ch);for(int i=0;i<n;i++){string str;while(1){cin.get(ch);if(ch=='\n')break;str+=ch;}while(1){int idx=str.find("Hoshino");if(idx==-1)break;str[idx+6]='a';}co... |
s217779709 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
cin.ignore( 1, '\n' );
for( int i = 0; i < n; ++i ){
string s;
getline( cin, s );
int index = 0;
while( ( index = s.find( "Hoshino", index ) ) != string::npos ){
s.replace( index, strlen("Hoshino"), "Hoshina" );
... | a.cc: In function 'int main()':
a.cc:17:43: error: 'strlen' was not declared in this scope
17 | s.replace( index, strlen("Hoshino"), "Hoshina" );
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by add... |
s320583122 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
cin.ignore( 1, '\n' );
for( int i = 0; i < n; ++i ){
string s;
getline( cin, s );
int index = 0;
while( ( index = s.find( "Hoshino", index ) ) != string::npos ){
s.replace( index, strlen("Hoshino"), "Hoshina" );
... | a.cc: In function 'int main()':
a.cc:17:43: error: 'strlen' was not declared in this scope
17 | s.replace( index, strlen("Hoshino"), "Hoshina" );
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by add... |
s544768027 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
cin.ignore( 1, '\n' );
for( int i = 0; i < n; ++i ){
string s;
getline( cin, s );
int index = 0;
while( 1 ){
index = s.find( "Hoshino", index );
if( index == string::npos ) break;
s.replace( index, strlen("H... | a.cc: In function 'int main()':
a.cc:19:43: error: 'strlen' was not declared in this scope
19 | s.replace( index, strlen("Hoshino"), "Hoshina" );
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by add... |
s873412390 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
cin.clear();
cin.ignore( 1, '\n' );
for( int i = 0; i < n; ++i ){
string s;
getline( cin, s );
int index = 0;
while( ( index = s.find( "Hoshino", index ) ) != string::npos ){
s.replace( index, strlen("Hoshino"), ... | a.cc: In function 'int main()':
a.cc:18:43: error: 'strlen' was not declared in this scope
18 | s.replace( index, strlen("Hoshino"), "Hoshina" );
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by add... |
s807820956 | p00101 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
cin.get();
for( int i = 0; i < n; ++i ){
string s;
getline( cin, s );
int index = 0;
while( ( index = s.find( "Hoshino", index ) ) != string::npos ){
s.replace( index, strlen("Hoshino"), "Hoshina" );
index += s... | a.cc: In function 'int main()':
a.cc:17:43: error: 'strlen' was not declared in this scope
17 | s.replace( index, strlen("Hoshino"), "Hoshina" );
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by add... |
s149476721 | p00101 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main()
{
int WordQuantity = 0,totalcnt = 0,alf = 0;
char Hoshino[8] = {"Hoshino"};
char Hoshina[8] = {"Hoshina"};
int n;
scanf("%d",&n);
fflush(stdin);
for(int loop = 0; loop < n; loop++){
char words[1000][1001];
... | a.cc: In function 'int main()':
a.cc:20:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
20 | gets(text);
| ^~~~
| getw
a.cc:23:42: error: 'strlen' was not declared in this scope
23 | for(WordQuantity = 0; totalcnt < strlen(text); WordQuantity++){
... |
s958453160 | p00101 | C++ | #include <cstdio>
#include <string>
using namespace std;
int main()
{
int WordQuantity = 0,totalcnt = 0,alf = 0;
char Hoshino[8] = {"Hoshino"};
char Hoshina[8] = {"Hoshina"};
int n;
scanf("%d",&n);
fflush(stdin);
for(int loop = 0; loop < n; loop++){
char words[1000][1001];
char text[1001];
totalcnt = 0;... | a.cc: In function 'int main()':
a.cc:20:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
20 | gets(text);
| ^~~~
| getw
a.cc:23:50: error: 'strlen' was not declared in this scope
23 | for(WordQuantity = 0; totalcnt <... |
s862363628 | p00101 | C++ | int main(){
int n;
std::cin >> n;cin.get( );
for(int i=0;i<n;i++){
string s;
getline(cin, s);
for(int j=6;j<s.size();j++){
if(s.substr(j-6,7)=="Hoshino"){
s.at(j)='a';
}
}
cout << s << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:14: error: 'cin' is not a member of 'std'
3 | std::cin >> n;cin.get( );
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main(){
a.cc:... |
s916283881 | p00101 | C++ | import java.util.*;
class Main{
public static void main(String[]z){
Scanner x=new Scanner(System.in);
int n=x.nextInt();x.nextLine();
for(;n>0;n--){
String s=x.nextLine();
System.out.println(s.replaceAll("Hoshino","Hoshina"));
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:9: error: expected ':' before 'static'
3 | public static void main(String[]z){
| ^~~~~~~
| :
a.cc:3:27: error: 'String' has... |
s330342615 | p00101 | C++ | #include<stdio.h>
#include<string.h>
int main(void)
{
int ct;
char *rp;
char retu[1000],s[]="Hoshina";
scanf_s("%d",&ct);
fflush(stdin);
for(int f1=0;f1<ct;f1++){
gets_s(retu);
while(1){
if(strstr(retu,"Hoshino")==NULL){
break;
}
if(rp=strstr(retu,"Hoshino")){
rp+=6;
*rp='a';
}
}
p... | a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
8 | scanf_s("%d",&ct);
| ^~~~~~~
| scanf
a.cc:11:17: error: 'gets_s' was not declared in this scope
11 | gets_s(retu);
| ^~~~~... |
s824276228 | p00101 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cin.ignore();
string line;
string s = "Hoshina";
while((getline, line))
{
string("Hoshino"!=string::npos)
line.replace()s;
}
cout<<line<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:19: error: left operand of comma operator cannot resolve address of overloaded function
10 | while((getline, line))
| ^~~~
a.cc:10:17: error: could not convert '((void)0, line)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
... |
s219289705 | p00101 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cin.ignore();
string line;
string s = "Hoshina";
while((getline, line))
{
string("Hoshino"!=string::npos)
line=s;
}
cout<<line<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:19: error: left operand of comma operator cannot resolve address of overloaded function
10 | while((getline, line))
| ^~~~
a.cc:10:17: error: could not convert '((void)0, line)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
... |
s993051081 | p00101 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cin.ignore();
string line;
string s = "Hoshina";
while((getline, line))
{
}
cout<<"Hoshina"<<endl;
cout<<"Hashino"<<endl;
cout<<"Masayuki Hoshina was the grandson of Ieyasu Tokugawa."<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:19: error: left operand of comma operator cannot resolve address of overloaded function
10 | while((getline, line))
| ^~~~
a.cc:10:17: error: could not convert '((void)0, line)' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
... |
s847330205 | p00101 | C++ | feawfae | a.cc:1:1: error: 'feawfae' does not name a type
1 | feawfae
| ^~~~~~~
|
s942518412 | p00101 | C++ | #include<iostream>
#inlcude<string>
int main(){
int a;
std::cin>>a;
for(int i=0;i<a+1;i++){
std::string str;
std::getline(std::cin,str);
for(int j=0;j<str.size();j++){
if(str[j]=='H'&&str[j+1]=='o'&&str[j+2]=='s'&&str[j+3]=='h'&&str[j+4]=='i'&&str[j+5]=='n'&&str[j+6]=='o'){
str[j+6]='a';
}
}
std:... | a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
2 | #inlcude<string>
| ^~~~~~~
| include
|
s370718103 | p00101 | C++ | include <iostream>
using namespace std;
int main(void){
int n;
cin >> n;
cin.ignore();
` string text,s,ret;
string str = "Hoshino";
string astr = "Hoshina";
for(int i = 0; i < n; ++i) {
getline(cin, text);
ret = text;
for(int j = 0; j < text.length()-6; ++j) {
... | a.cc:10:1: error: stray '`' in program
10 | ` string text,s,ret;
| ^
a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin >> n;
| ^~~
a.cc:10:5: error: 'string... |
s348063713 | p00101 | C++ | fa | a.cc:1:1: error: 'fa' does not name a type
1 | fa
| ^~
|
s304701142 | p00101 | C++ | #include<iostream>
#include<string>
int main(){
int n;
char c;
std::string str,Del;
std::cin>>n;
std::getline(std::cin,str);
while( --n ,std::getline(std::cin,str) , n+1 ){
int Result;
while( (Result = str.find("Hoshino") ) != std::string::npos )str.replace(Result,strlen("Hoshino"),"Hoshina");
std::cout<<s... | a.cc: In function 'int main()':
a.cc:12:97: error: 'strlen' was not declared in this scope
12 | while( (Result = str.find("Hoshino") ) != std::string::npos )str.replace(Result,strlen("Hoshino"),"Hoshina");
| ... |
s870192610 | p00101 | C++ | #include <iostream>
#include <string>
int main()
{
const std::string str_false = "Hoshino";
const std::string str_true = "Hoshina";
u_int num_of_data;
std::string text;
std::cin >> num_of_data;
std::cin.ignore();
for(u_int i = 0; i < num_of_data; ++i){
getline(std::cin, text);... | a.cc: In function 'int main()':
a.cc:18:56: error: 'string' has not been declared
18 | while((index = text.find(str_false, index)) != string::npos)
| ^~~~~~
|
s073383645 | p00101 | C++ | #include <iostream>
#include <string>
int main()
{
const std::string str_false = "Hoshino";
const std::string str_true = "Hoshina";
u_int num_of_data;
std::string text;
getline(std::cin, num_of_data);
for(u_int i = 0; i < num_of_data; ++i){
getline(std::cin, text);
u_int i... | a.cc: In function 'int main()':
a.cc:11:12: error: no matching function for call to 'getline(std::istream&, u_int&)'
11 | getline(std::cin, num_of_data);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h... |
s033663878 | p00102 | Java |
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
int n = scanner.nextInt();
if (n == 0)
break;
int[][] num = new int[n + 1][n + 1];
for (int i = 0; i < n + 1; i++) {
for (int j = 0; j < n + 1; j++) {
if (i != n && j != n... | Main.java:4: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s079054745 | p00102 | Java | package main;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MatrixLikeComputation {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputSt... | Main.java:7: error: class MatrixLikeComputation is public, should be declared in a file named MatrixLikeComputation.java
public class MatrixLikeComputation {
^
1 error
|
s142422256 | p00102 | Java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MatrixLikeComputation {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(Sys... | Main.java:6: error: class MatrixLikeComputation is public, should be declared in a file named MatrixLikeComputation.java
public class MatrixLikeComputation {
^
1 error
|
s567133304 | p00102 | Java | import java.util.*;
public class a {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int all_sum =0;
while( true )
{
String n = in.nextLine();
int length = Integer.parseInt(n);
if(length == 0){
break;
}
int col_sum[] = new int[length];
for(in... | Main.java:3: error: class a is public, should be declared in a file named a.java
public class a {
^
1 error
|
s783206661 | p00102 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[][] array = new int[n + 1][n + 1];
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
array[i][j] = scan... | Main.java:19: error: cannot find symbol
jsum += array[i][j];
^
symbol: variable jsum
location: class Main
1 error
|
s791752040 | p00102 | Java | public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (sc.hasNext()) {
int n = Integer.parseInt(sc.nextLine());
calcMat(n);
}
}
private static void calcMat(int n) {
int[][] mt = new int[n + 1][n + 1];
for (int i = 0; i < n; i++) {
Strin... | Main.java:3: error: cannot find symbol
static Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
static Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s050974115 | p00102 | Java | import java.util.*;
public class Main {
Scanner sc = new Scanner)System.in;
void run() {
while (true) {
int n = sc.nextInt();
if (n == 0) break;
int[][] mat = new int[n+1][n+1];
for (int i=0;i<n;i++) for (int j=0;j<n;j++) {
mat[i][j] = sc.nextInt();
mat[i][n] = mat[i][j];
mat[n][j] = mat[i]... | Main.java:4: error: '(' or '[' expected
Scanner sc = new Scanner)System.in;
^
Main.java:4: error: <identifier> expected
Scanner sc = new Scanner)System.in;
^
2 errors
|
s287261746 | p00102 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import sun.security.krb5.KdcComm;
import sun.tools.jar.resources.jar;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
... | Main.java:7: error: package sun.security.krb5 is not visible
import sun.security.krb5.KdcComm;
^
(package sun.security.krb5 is declared in module java.security.jgss, which does not export it to the unnamed module)
Main.java:8: error: package sun.tools.jar.resources is not visible
import sun.tools.j... |
s322125469 | p00102 | C | #include<stdio.h>
int main(void){
int a[11][11];
int b[11][11];
int i,j,k,l;
int n;
while(1){
a[11][11]={0};
b[11][11]={0};
scanf("%d",&n);
if(n==0)
break;
for(i=0;i<n;i++)
for(j=0;j<n;j++)
scanf("%d",&a[i][j]);
for(i=0;i<n;i++)
for(j=0;j<n;j++)
a[i][n]+=a[i][j];
... | main.c: In function 'main':
main.c:9:15: error: expected expression before '{' token
9 | a[11][11]={0};
| ^
main.c:10:15: error: expected expression before '{' token
10 | b[11][11]={0};
| ^
|
s708644996 | p00102 | C |
#include<stdio.h>
int main(){
int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0,j<a;j++){
for(i=0,i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i]
y[i] = n[i][... | main.c: In function 'main':
main.c:4:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
4 | int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
| ^
main.c:4:46: error: expected expression before ',' token
4 | int n[10][10] = ... |
s882092045 | p00102 | C |
#include<stdio.h>
int main(){
int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0,j<a;j++){
for(i=0,i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
y[i] = n... | main.c: In function 'main':
main.c:4:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
4 | int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
| ^
main.c:4:46: error: expected expression before ',' token
4 | int n[10][10] = ... |
s828931064 | p00102 | C |
#include<stdio.h>
int main(){
int n[10][10] = {}, x[9] = {}, y[9] = {}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0,j<a;j++){
for(i=0,i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
y[i] ... | main.c: In function 'main':
main.c:8:40: error: expected ';' before ')' token
8 | for(j=0,j<a;j++){
| ^
| ;
main.c:9:48: error: expected ';' before ')' token
9 | for(... |
s258456242 | p00102 | C |
#include<stdio.h>
int main(){
int n[10][10] = {}, x[9] = {}, y[9] = {}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0,j<a;j++){
for(i=0,i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
y[i] ... | main.c: In function 'main':
main.c:8:40: error: expected ';' before ')' token
8 | for(j=0,j<a;j++){
| ^
| ;
main.c:9:48: error: expected ';' before ')' token
9 | for(... |
s456336264 | p00102 | C |
#include<stdio.h>
int main(){
int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0,j<a;j++){
for(i=0,i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
y[i]... | main.c: In function 'main':
main.c:8:40: error: expected ';' before ')' token
8 | for(j=0,j<a;j++){
| ^
| ;
main.c:9:48: error: expected ';' before ')' token
9 | for(... |
s467113701 | p00102 | C | #include<stdio.h>
int main(){
int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0;j<a;j++){
for(i=0;i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i];
y[i] ... | main.c: In function 'main':
main.c:17:39: error: 'o' undeclared (first use in this function)
17 | for(j=o;j<a;j++){
| ^
main.c:17:39: note: each undeclared identifier is reported only once for each function it appears in
|
s079339432 | p00102 | C | #include<stdio.h>
#include<stdafx.h>
int main(){
int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0;j<a;j++){
for(i=0;i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]... | main.c:2:9: fatal error: stdafx.h: No such file or directory
2 | #include<stdafx.h>
| ^~~~~~~~~~
compilation terminated.
|
s148881683 | p00102 | C | #include<stdio.h>
int main(){
int i,j,ans[10]={0},n,tmp,sum;
while(scanf("%d",&n)!=EOF){
for(i=0;i<n;i++){
for(j=0;j<n;j++){
scnaf("%d",&tmp);
if(i==0)ans[j]=tmp;
else ans[j]+=tmp;
if(j==0)sum=tmp;
else sum+=tmp;
printf("%5d",tmp);
}
printf("%5d\n",sum);
}
for(i=0,sum=0;i<n;i++)... | main.c: In function 'main':
main.c:7:33: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scnaf("%d",&tmp);
| ^~~~~
| scanf
|
s335740068 | p00102 | C | #include<stdio.h>
int main(void){
int i,j,ans[10]={0},n,tmp,sum;
while(scanf("%d",&n),n!=EOF){
for(i=0;i<n;i++){
for(j=0;j<n;j++){
scnaf("%d",&tmp);
if(i==0)ans[j]=tmp;
else ans[j]+=tmp;
if(j==0)sum=tmp;
else sum+=tmp;
printf("%5d",tmp);
}
printf("%5d\n",sum);
}
for(i=0,sum=0;i<... | main.c: In function 'main':
main.c:7:33: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scnaf("%d",&tmp);
| ^~~~~
| scanf
|
s679747855 | p00102 | C | #include<stdio.h>
int main(void){
int i,j,ans[10]={0},n,tmp,sum;
while(scanf("%d",&n)!=EOF){
for(i=0;i<n;i++){
for(j=0;j<n;j++){
scnaf("%d",&tmp);
if(i==0)ans[j]=tmp;
else ans[j]+=tmp;
if(j==0)sum=tmp;
else sum+=tmp;
printf("%5d",tmp);
}
printf("%5d\n",sum);
}
for(i=0,sum=0;i<n;... | main.c: In function 'main':
main.c:7:33: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scnaf("%d",&tmp);
| ^~~~~
| scanf
|
s296111078 | p00102 | C | #inclued <stdio.h>
#include <assert.h>
#include <limits.h>
int main() {
int i, j, k = 0;
int n[INT_MAX], data[INT_MAX][INT_MAX][INT_MAX];
do {
scanf("%d", &n[k]);
assert(n[k] <= 10);
for(i = 0; i < n[k]; i ++) {
for(j = 0; j < n[k]; j ++) {
scanf("%d ", &data[i][j][k]);
assert(data[i][j][k] <= ... | main.c:1:2: error: invalid preprocessing directive #inclued; did you mean #include?
1 | #inclued <stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:7:25: error: size '18446744056529682436' of array 'data' exceeds maximum object size '9223372036854775807'
7 | int n[INT_MAX], d... |
s281294152 | p00102 | C | #inclued <stdio.h>
#include <assert.h>
#include <limits.h>
int main() {
int i, j, k = 0;
int n[INT_MAX], data[INT_MAX][INT_MAX][INT_MAX];
do {
scanf("%d", &n[k]);
assert(n[k] <= 10);
for(i = 0; i < n[k]; i ++) {
for(j = 0; j < n[k]; j ++) {
scanf("%d ", &data[i][j][k]);
assert(data[i][j][k] <= ... | main.c:1:2: error: invalid preprocessing directive #inclued; did you mean #include?
1 | #inclued <stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:7:25: error: size '18446744056529682436' of array 'data' exceeds maximum object size '9223372036854775807'
7 | int n[INT_MAX], d... |
s501877513 | p00102 | C | #inclued <stdio.h>
#include <assert.h>
#include <limits.h>
int main() {
int i, j, k = 0;
int n[INT_MAX], data[INT_MAX][INT_MAX][INT_MAX];
do {
scanf("%d", &n[k]);
assert(n[k] <= 10);
for(i = 0; i < n[k]; i ++) {
for(j = 0; j < n[k]; j ++) {
scanf("%d ", &data[i][j][k]);
assert(data[i][j][k] <= ... | main.c:1:2: error: invalid preprocessing directive #inclued; did you mean #include?
1 | #inclued <stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:7:25: error: size '18446744056529682436' of array 'data' exceeds maximum object size '9223372036854775807'
7 | int n[INT_MAX], d... |
s592229374 | p00102 | C |
#include <cstdio>
int main(){
int i,j,n,a[10][10],b[10],c[10],sum;
while(1){
scanf("%d",&n);
if(n == 0) break;
sum = 0;
for(i=0;i<n;i++){
b[i] = 0;
for(j=0;j<n;j++){
scanf("%d",&a[i][j]);
b[i] += a[i][j];
sum += a[i][j];
}
}
for(i=0;i<n;i++){
c[i] = 0;
fo... | main.c:2:10: fatal error: cstdio: No such file or directory
2 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s750466636 | p00102 | C | #include<stdio.h>
int main(void){
int i,j,n,table[11][11],w;
while(1){
scanf("%d",&n);
if(n==0)break;
w=0;
for(i=0;i<11;i++)
table[n][i]=0;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
scanf("%d",&table[i][j]);
w+=table[i][j];
if(j==n-1){
table[i][j+1]=w;
w=0;
}
table[n][j]+... | main.c: In function 'main':
main.c:32:28: error: expected expression before ')' token
32 | printf((j==n)?"\n":);
| ^
|
s443511557 | p00102 | C | #include<iostream>
#include<iomanip>
using namespace std;
int matrix[11][11];
int main()
{
int n,sum;
for(;;)
{
cin>>n;
if(n==0)break;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin>>matrix[i][j];
}
}
for(int i=0;i<n;i++)
{
sum=0;
for(int j=0;j<n;j++)
{
sum+=matrix[i]... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s188111643 | p00102 | C | #include<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>
using namespace std;
typedef pair<int,int> pii;
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)
int main(){
int n,t;... | main.c:2:9: fatal error: string: No such file or directory
2 | #include<string>
| ^~~~~~~~
compilation terminated.
|
s810916415 | p00102 | C | #include<stdio.h>
int main(void)
{
int a[10]={0},b[10]={0};
int i,k,x[10][10],n,sum=0;
scanf("%d",&n);
for(i=0;i<n;i++){
for(k=0:k<n;k++){
scanf("%d",&x[i][k]);
a[k]+=x;
b[i]+=x;
}
}
for(i=0;i<n;i++){
for(k=0:k<n;k++){
printf("%5d",x[i][k]);
}
printf("%5d\n",b[... | main.c: In function 'main':
main.c:10:12: error: expected ';' before ':' token
10 | for(k=0:k<n;k++){
| ^
| ;
main.c:10:20: error: expected ';' before ')' token
10 | for(k=0:k<n;k++){
| ^
| ;
main.c:12:11: error: assignmen... |
s076059517 | p00102 | C | #include<stdio.h>
int main(void)
{
int a[10]={0},b[10]={0};
int i,k,x[10][10],n,sum=0;
scanf("%d",&n);
for(i=0;i<n;i++){
for(k=0;k<n;k++){
scanf("%d",&x[i][k]);
a[k]+=x;
b[i]+=x;
}
}
for(i=0;i<n;i++){
for(k=0:k<n;k++){
printf("%5d",x[i][k]);
}
printf("%5d\n",b[... | main.c: In function 'main':
main.c:12:11: error: assignment to 'int' from 'int (*)[10]' makes integer from pointer without a cast [-Wint-conversion]
12 | a[k]+=x;
| ^~
main.c:13:11: error: assignment to 'int' from 'int (*)[10]' makes integer from pointer without a cast [-Wint-conversion]
13 ... |
s647219599 | p00102 | C | include<stdio.h>
main(){
int data,i,j;
int a[101][101];
while(1){
scanf("%d",&data);
if(data == 0) break;
for(i=0;i<data;i++){
for(j=0;j<data;j++){
scanf("%d",&a[i][j]);
a[i][data] += a[i][j];
a[data][j] += a[i][j];
a[data][data] += a[i][j];
}
}
for(i=0;i<data+1;i++){
for... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s137910909 | p00102 | C++ | #!/usr/bin/python
# -*- coding: utf-8 -*-
def main():
while(True):
# 入力
N = int(raw_input())
if N == 0:
break
inp = []
for x in range(N):
input_list = map(int, raw_input().split())
inp.append(input_list)
printAns(inp)
def printA... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/python
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:6:11: error: invalid preprocessing directive #\U00005165\U0000529b
6 | # 入力
| ^~~~
a.cc:32:14: warning... |
s663866717 | p00102 | C++ | #include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int N,num[11][11]={},x;
int a;
while(1)
{cin>>N;
if(N==0)break;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++)
{cin>>num[i][j];num[i][N]+=num[i][j];}
}
for(int i=0;i<N;i++)
num[N][N]+=num[i][N];
for(int i=0;i<N;i++)
for(int j=0;j<N;j++... | a.cc: In function 'int main()':
a.cc:29:15: error: expected ';' before '}' token
29 | cout<<endl;a=0
| ^
| ;
......
32 | }
| ~
|
s060096102 | p00102 | C++ | #include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;
int main(){
double num[12][12]={};
int N ;
int a=0;
while(1)
{cin>>N;
if(N==0)break;
for(int i=0;i<N;i++){
for(int j=0;j<N;j++)
{cin>>num[i][j];num[i][N]+=num[i][j];}
}
for(int i=0;i<N;i++)
num[N][N]+=num[i][N];
for(int i=0;i<N;i++)
for(int ... | a.cc: In function 'int main()':
a.cc:26:22: error: expected primary-expression before ';' token
26 | printf("5%lf",num[i][;}
| ^
a.cc:26:22: error: expected ']' before ';' token
26 | printf("5%lf",num[i][;}
| ^
| ]
|
s227748796 | p00102 | C++ | #include<stdio.h>
#include<stdafx.h>
int main(){
int n[9][9] = {0}, x[9] = {0}, y[9] = {0}, a, i, j;
while(1){
scanf("%d",&a);
if(a!=0){
for(j=0;j<a;j++){
for(i=0;i<a;i++){
scanf("%d",&n[j][i]);
}
}
for(i=0;i<9;i++){
x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]... | a.cc:2:9: fatal error: stdafx.h: No such file or directory
2 | #include<stdafx.h>
| ^~~~~~~~~~
compilation terminated.
|
s354613663 | p00102 | C++ | #include <iostream.h>
#include <vector>
using namespace std;
int main(){
int data_size;
cin >> data_size;
while (data_size){
vector<vector<int>> data;
vector<vector<int>> data_digit;
data.resize((data_size + 1)*(data_size + 1));
data_digit.resize((data_size + 1) * (data_size + 1));
for (int i = 0; i < dat... | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s342529570 | p00102 | C++ | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main{
public static void main (String[] args) throws java.lang.Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
while(!line.equals("0")){
int n = Integer.parseIn... | 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:2:1: error: 'import' does not name a type
2 | import java.lang.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1... |
s215975145 | p00102 | C++ | //#define scanf_s scanf
//#define sscanf_s sscanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 11
#define HO 6
int main(void)
{
int n;
while (1) {
scanf_s("%d", &n);
if (n == 0) break;
int date[MAX][MAX] = { 0 };
for (int i =... | a.cc: In function 'int main()':
a.cc:15:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
15 | scanf_s("%d", &n);
| ^~~~~~~
| scanf
|
s608677486 | p00102 | C++ | #include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include <memory>
#include <iomanip>
int main(int argc, char* argv[])
{
while (true) {
std::string line;
std::stringstream buffer;
getline(std::cin, line);
buffer << line;
size_t length = 0;
b... | a.cc: In function 'int main(int, char**)':
a.cc:20:9: error: 'memset' was not declared in this scope
20 | memset(total, 0, sizeof(int) * width);
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <iomanip>... |
s008229549 | p00102 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int n,c;
while(cin>>n,n){
int a[n+1][n+1];
rep(i,n){c=0;rep(j,n){
cin>>a[i][j];
c+=a[i][j];
}
a[i][n]=c;
}
rep(j,n){c=0;rep(i,n){
c+=a[i][j];
}
a[n][j]=c;
}
r... | a.cc: In function 'int main()':
a.cc:19:36: error: 'j' was not declared in this scope
19 | rep(i,n+1){rep(i,n+1){cout<<a[i][j];}cout<<endl;}
| ^
|
s741643435 | p00102 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int sub;
int sum;
int all;
while(s.hasNext()){
sub = s.nextInt();
all = 0;
if(sub == 0)
break;
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.