submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s779176639 | p01101 | C | #include<stdio.h>
int main(void){
int n,m,i,j,total,max,x,s[100];
while(1){
scanf("%d",&n);
scanf("%d",&m);
if(n==0){
break;
}
for(i=0;i<n;i++){
scanf("%d",&s[i]);
}
for(i=0;i<n;i++){
total=s[i];
if(i==0){
... | main.c: In function 'main':
main.c:24:16: error: expected expression before '<' token
24 | if(max=<m){
| ^
|
s930554158 | p01101 | C | #include<stdio.h>
int main(void){
int i,j,n,m,a[1000],s,s1;
scanf("%d",&n);
scanf("%d",&m);
if(n==0&&m==0){
break;
}
for(i=0;i<=n-1;i++){
scanf("%d",&a[i]);
}
s1=0;
for(i=0;i<=n-1;i++){
for(j=i+1;j=n-1;i++){
s=a[i]+a[j];
if(s<=m&&s1<s... | main.c: In function 'main':
main.c:9:9: error: break statement not within loop or switch
9 | break;
| ^~~~~
|
s060019184 | p01101 | C | #include<stdio.h>
int main(void)
{
int n,m,a[1000],i,t,sum,max;
scanf("%d %d",&n&,m);
for(i=0;i<=n;i++)
{
scanf("%d",&a[i]);
if(a[i]==0 && a[i-1]==0)
{
break;
}
}
max = 0;
for(i=0;i<=n;i++)
{
for(t=0;t<=n;t++)
{
sum = a[i]+a[t];
if(sum>max && sum<m)
{
max = s... | main.c: In function 'main':
main.c:6:26: error: expected expression before ',' token
6 | scanf("%d %d",&n&,m);
| ^
|
s885049912 | p01101 | C | #include<studio.h>
int main(){
int n,m;
int a[1000];
int i,j,sum,max;
while(scanf("%d,%d," &n,&m)){
if(n==0&m==0)
break;
for(i=0;i<n;i++){
scanf("%d", &a[i]);
}
max=0;
for(i=0; i<n; i++){
for(j=i+1;j<n;j++){
sum=a[i]+a[j];
if(sum>max&&sum<=m)
max=sum;
}
}
if... | main.c:1:9: fatal error: studio.h: No such file or directory
1 | #include<studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s403557642 | p01101 | C | include <stdio.h>
int main()
{
int goods_num_n, max_cost_m;
int goods_cost_a[1000];
int n_sum = 0;
int counter_i, counter_j;
int buying_goods = 0, buying_max = 0;
for(n_sum = 0 ; n_sum <= 50000 ; n_sum += goods_num_n)
{
scanf("%d %d", &goods_num_n, &max_cost_m);
if(goods_num_n == 0 && max_cost_m == 0)
... | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s822105297 | p01101 | C | #include <bits/stdc++.h>
using namespace std;
int a[1010];
int n, m;
int main(){
while(true){
cin >> n >> m;
if(n == 0 && m == 0) break;
for(int i = 0; i < n; i++) cin >> a[i];
int ans = 0;
int tmp = 0;
for(int i = 0; i < n; i++){
for (int j = i + 1; j < n; j++){
tmp = a[i] + a... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s180685663 | p01101 | C | #include <stdio.h>
int main(){
int n, m, total, pricemax;
int price[1024];
while(1){
scanf("%d %d", &n, &m);
if( (n == 0)&&(m == 0) ) break;
for(i = 0; i < n; i++){
scanf("%d", price[i]);
}
total = 0;
pricemax = 0;
for(i = 0; i < n - 1; i++){
for(j = i+1; j < n; j++){
... | main.c: In function 'main':
main.c:11:9: error: 'i' undeclared (first use in this function)
11 | for(i = 0; i < n; i++){
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:11: error: 'j' undeclared (first use in this function)
19 | ... |
s273180674 | p01101 | C++ | #include "bits\stdc++.h"
using namespace std;
int main() {
int a[1000];
int n, m;
while (cin >> n >> m, n) {
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
if (a[i] + a[j] <= m) ans = max(ans, a[i] + a[j]);
}
}
if (an... | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include "bits\stdc++.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s720455294 | p01101 | C++ | int a[1000];
int main(void)
{
while (1) {
int n, m, max = -1;
cin >> n >> m;
if (n == 0) {
break;
}
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
for (int i = 0; i < n - 1; ++i) {
for (int j = i + 1; j < n; ++j) {
if (max < a[i] + a[j] && a[i] + a[j] <= m) {
max = a[... | a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin >> n >> m;
| ^~~
a.cc:23:7: error: 'cout' was not declared in this scope
23 | cout << "NONE" << endl;
| ^~~~
a.cc:23:25: error: 'endl' was not declared in this scope
23 | cout <<... |
s436879399 | p01101 | C++ | n, m = map(int, input().split())
while n != 0 and m != 0:
a = list(map(int, input().split()))
dp = []
for i in range(n):
for j in range(n):
if a[i]+a[j]<= m and i != j:
dp.append(a[i]+a[j])
if len(dp) == 0:
print("NONE")
else:
print(max(dp))
n,... | a.cc:1:1: error: 'n' does not name a type
1 | n, m = map(int, input().split())
| ^
|
s768961815 | p01101 | C++ | #include <iostream>
int main(void){
while(1){
int n , m;
cin >> n;
cin >> m;
if(n == 0 && m == 0){
return 0;
}
int a[n];
for(int i = 0 ; i < n ; i ++){
cin >> a[i];
}
int sum[n][n];
for(int i = 0 ; i < n ; i ++){
for(int j = 0 ; j < n ; j++){
if(i ... | a.cc: In function 'int main()':
a.cc:6:5: 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; ///< Linked ... |
s854967235 | p01101 | C++ | #include <iostream>
int main(void){
while(1){
int n , m;
cin >> n;
cin >> m;
if(n == 0 && m == 0){
return 0;
}
int a[n];
for(int i = 0 ; i < n ; i ++){
cin >> a[i];
}
int sum[n][n];
for(int i = 0 ; i < n ; i ++){
for(int j = 0 ; j < n ; j++){
if(i ... | a.cc: In function 'int main()':
a.cc:6:5: 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; ///< Linked ... |
s695424185 | p01101 | C++ | #include <stdio.h>
int main(void)
{
int n, m; /* n:??????????????°, m:?????§????????? */
int max = 0;
int price[1000];
int i = 0;
while (1) {
scanf_s("%d %d", &n, &m);
if (n == 0 && m == 0)
break;
else {
for (i = 0; i < n; i++) {
scanf_s("%d", &price[i]);
}
/* printf("n = %d, m = %d\n", n, ... | a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | scanf_s("%d %d", &n, &m);
| ^~~~~~~
| scanf
|
s604007828 | p01101 | C++ | include <stdio.h>
int max(int a, int b){
if(a > b)
return a;
else
return b;
}
int main(){
while(1 == 1){
int n, m, i, j, k, tmp;
int result = 0;
scanf("%d%d", &n, &m);
if(n == 0 && m ==0)
break;
int a[n];
for (i = 0; i < n; i++){
scanf("%d", &a[i]);
}
for(int i = 0; i < n; i++){
... | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:13:9: error: 'scanf' was not declared in this scope
13 | scanf("%d%d", &n, &m);
| ^~~~~
a.cc:24:30: error: 'max' was not declared in this scope
24 | ... |
s890808666 | p01101 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
while(true){
int n,m;
cin>>n>>m;
if(n=0&&m==0){
break;
}
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
sort(a,a+n);
while(true){
int i=0;
if(a[n]+a[n-i]<=m){
int pay=a[n]+a[n-i];
break;
}
i++;
}
cou... | a.cc: In function 'int main()':
a.cc:25:23: error: 'pay' was not declared in this scope
25 | cout<<pay<<endl;
| ^~~
|
s641292135 | p01101 | C++ | # Taro's Shopping
Problem URL: http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1616
## Problem
You are required to answer some questions.
For each question, you are given $n$ integers $a_1, a_2, \dots, a_n$ and an integer $m$. You are required to find a pair of element $(a_i, a_j)$ where $a_i \not = a_j$, ... | a.cc:1:3: error: invalid preprocessing directive #Taro
1 | # Taro's Shopping
| ^~~~
a.cc:1:7: warning: missing terminating ' character
1 | # Taro's Shopping
| ^
a.cc:5:1: error: stray '##' in program
5 | ## Problem
| ^~
a.cc:9:58: error: stray '\' in program
9 | For each questi... |
s334503950 | p01101 | C++ | #include <iostream>
int main(void)
{
int i, j, num, lim, price[1000], temp, max;
for(;;) {
cin >> num;
cin >> lim;
if(num == 0 && lim == 0) {
return 0;
}
for(i = 0; i < num; i++) {
cin >> price[i];
}
max = 0;
for(i=0; i < ... | a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> 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; ... |
s894000068 | p01101 | C++ | #include <iostream>
using namespace std;
int main() {
int a[1001];
while (cin >> n >> m) {
if (n == 0 && m == 0) { break; }
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ans = -1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
... | a.cc: In function 'int main()':
a.cc:7:19: error: 'n' was not declared in this scope
7 | while (cin >> n >> m) {
| ^
a.cc:7:24: error: 'm' was not declared in this scope
7 | while (cin >> n >> m) {
| ^
a.cc:12:9: error: 'ans' was not declared in this ... |
s785159361 | p01101 | C++ | #include <iostream>
using namespace std;
int main() {
int a[1001];
int n, m;
while (cin >> n >> m) {
if (n == 0 && m == 0) { break; }
for (int i = 0; i < n; i++) {
cin >> a[i];
}
ans = -1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; ... | a.cc: In function 'int main()':
a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
13 | ans = -1;
| ^~~
| abs
a.cc:16:36: error: 'M' was not declared in this scope
16 | if (a[i] + a[j] <= M && a[i] + a[j] > ans) {
| ... |
s822686059 | p01101 | C++ | #include <iostream>
using namespace std;
int main() {
int a[1001];
int n, m;
while (cin >> n >> m) {
if (n == 0 && m == 0) { break; }
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int ans = -1;
for (int i = 0; i < n; i++) {
for (int j = 0; j <... | a.cc: In function 'int main()':
a.cc:16:36: error: 'M' was not declared in this scope
16 | if (a[i] + a[j] <= M && a[i] + a[j] > ans) {
| ^
a.cc:17:38: error: expected ';' before '}' token
17 | ans = a[i] + a[j]
| ... |
s124405046 | p01101 | C++ | #include <iostream>
using namespace std;
int main() {
int a[1001];
int n, m;
while (cin >> n >> m) {
if (n == 0 && m == 0) { break; }
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int ans = -1;
for (int i = 0; i < n; i++) {
for (int j = 0; j <... | a.cc: In function 'int main()':
a.cc:17:38: error: expected ';' before '}' token
17 | ans = a[i] + a[j]
| ^
| ;
18 | }
| ~
a.cc:21:49: error: no matc... |
s457753020 | p01101 | C++ | #include <iostream>
using namespace std;
int main() {
int a[1001];
int n, m;
while (cin >> n >> m) {
if (n == 0 && m == 0) { break; }
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int ans = -1;
for (int i = 0; i < n; i++) {
for (int j = 0; j <... | a.cc: In function 'int main()':
a.cc:21:49: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
21 | cout << (ans == -1 ? "NONE" : string(ans)) << endl;
| ^
In file included from /usr/include/c++/14/string:54,
... |
s314278708 | p01101 | C++ | # -*- coding: utf-8 -*-
while 1 do
n,m=gets.split().map!{|i|i.to_i}
if n==0&&m==0 then break end
a=gets.split().map!{|i|i.to_i}
a.slice!(n..a.length)
a.sort
max=-1
n.times do |i|
(i+1).upto(n-1) do |j|
if a[i]+a[j]<=m then
max=a[i]+a[j]
end
end
end
if max==-1 then puts "NON... | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:2:1: error: expected unqualified-id before 'while'
2 | while 1 do
| ^~~~~
a.cc:4:3: error: expected unqualified-id before 'if'
4 | if n==0&&m==0 then break end
| ^~
a.cc:6:3: error: 'a' does not ... |
s928849277 | p01101 | C++ | int main()
{
int n=1,m=1;
int x[1000];
int cnt=0;
int max;
while(n>0&&m>0){
max=0;
std::cin>>n>>m;
if(n==0&&m==0) max=-1;
int a[n+1];
for(int i=1;i<n+1;i++){
std::cin>>a[i];
}
for(int i=1;i<n;i++){
for(int j=i+1;j<n+1;j++){
int y=a[i]+a[j];
if(max<y&&y<=m) max=a[i... | a.cc: In function 'int main()':
a.cc:11:10: error: 'cin' is not a member of 'std'
11 | std::cin>>n>>m;
| ^~~
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:16:12: error: 'cin... |
s616950842 | p01101 | C++ | #include <iostream>
int main(void){
int n,m,tmp,cnt,max;
std::cin>>n;
std::cin>>m;
int a[n];
while(n!=0 && m!=0){
a[n]={0};
for(int i=0;i<n;i++){
std::cin>>a[i];
}
max=a[0]+a[1];
cnt=0;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
tmp=a[i]+a[j];
if(tmp<=m && tmp>=max){... | a.cc: In function 'int main()':
a.cc:34:12: error: expected '}' at end of input
34 | return 0;
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
s516926031 | p01101 | C++ | s=[]
cnt=0
while 1:
max=0
n,m =map(int,input().split())
l=list(map(int,input().split()))
if n==0 and m==0:
break
for i in range(len(l)):
for j in range(len(l)):
if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
max=l[i]+l[j]
if max==0:
s+=["NONE"... | a.cc:1:1: error: 's' does not name a type
1 | s=[]
| ^
|
s959227314 | p01101 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s302312541 | p01101 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s150214352 | p01101 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int n,m,b,max=0;
while(n!=0 && m!=0){
vector<int> a;
max=0;
int a[1000]={};
cin>>n>>m;
for(int i=0;i<n;i++){
cin>>b;
a.push_back(b);
}
for(int j=0;j<n;j++){
for(int k=0;k<n;k++){
if(j!=k){
if(ma... | a.cc: In function 'int main()':
a.cc:9:9: error: conflicting declaration 'int a [1000]'
9 | int a[1000]={};
| ^
a.cc:7:17: note: previous declaration as 'std::vector<int> a'
7 | vector<int> a;
| ^
|
s814534031 | p01101 | C++ | #include<iostream>
using namespace std;
int main(){
int n,m,b,max=0;
while(1){
max=0;
cin>>n>>m;
if(n==0&&m==0){
break;
}
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int j=0;j<n;j++){
for(int k=0;k<n;k++){
if(max<a[j]+a[k] && a[j]+a[k]<=m&&j!=k){
max... | a.cc: In function 'int main()':
a.cc:24:7: error: request for member 'clear' in 'a', which is of non-class type 'int [n]'
24 | a.clear();
| ^~~~~
|
s323251859 | p01101 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main(void) {
int n, m;
int i, j;
int sum = 0, max = 0;
int price[1000];
while (1) {
cin >> n >> m;
if (n == 0 && m == 0)break;
for (i = 0; i<n; i++) {
cin >> price[i];
}
for (i = 0; i<n - 1; i++) {
for (j = i + 1; j<n; j++) {
... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s027710819 | p01101 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main(void) {
int n, m;
int i, j;
int sum = 0, max = 0;
int price[1000];
while (1) {
cin >> n >> m;
if (n == 0 && m == 0)break;
for (i = 0; i<n; i++) {
cin >> price[i];
}
for (i = 0; i<n - 1; i++) {
for (j = i + 1; j<n; j++) {
... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s451535491 | p01101 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
int main(void) {
int n, m;
int i, j;
int sum = 0, max = 0;
int price[1000];
while (1) {
cin >> n >> m;
if (n == 0 && m == 0)break;
for (i = 0; i<n; i++) {
cin >> price[i];
}
for (i = 0; i<n - 1; i++) {
for (j = i + 1; j<n; j++) {
... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s139831733 | p01101 | C++ | int main(){
int n,m;
int A[10000];
int B[10000];
int max;
while(1){
std::scanf("%d %d",&n,&m);
if(n == 0 && m == 0) break;
bool flag = 1;
for(int i = 0;i < n;i++){
std::scanf("%d",&A[i]);
}
max = A[0] + A[1];
if(max < m){
flag = 0;
}
for(int i = 0;i ... | a.cc: In function 'int main()':
a.cc:8:10: error: 'scanf' is not a member of 'std'
8 | std::scanf("%d %d",&n,&m);
| ^~~~~
a.cc:12:12: error: 'scanf' is not a member of 'std'
12 | std::scanf("%d",&A[i]);
| ^~~~~
a.cc:31:12: error: 'printf' is not a member of 'std'
31 |... |
s906561436 | p01101 | C++ | #include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
static int n, m, ans;
static int a[100000];
void input() {
cin >> n;
cin >> m;
for (int i = 1; i < n + 1; i++) {
cin >> a[i];
}
}
void pre() {
ans = 0;
}
void operate() {
for (int i=1;i<n+1;i++)
for (int j = i + 1; j < n + 1; j... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s548246244 | p01101 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,... | a.cc: In function 'int main()':
a.cc:75:33: error: operands to '?:' have different types 'const char*' and 'int'
75 | cout << (res==0 ? "NONE" : res) << ln;
| ~~~~~~~^~~~~~~~~~~~~~
|
s397738047 | p01101 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#include<fstream>
#include<cstdio>
#include<deque>
#include<iomanip>
using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 100000000... | a.cc: In function 'int main()':
a.cc:60:17: error: 'else' without a previous 'if'
60 | else cout << ans << endl;
| ^~~~
|
s907075479 | p01102 | Java | import java.util.ArrayList;
import java.util.Scanner;
/**
* Kadai
*/
public class Kadai {
public void go() {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String[] lines = new String[2];
String[][] linesStruct = new String[2][];
lines[0] = sc... | Main.java:7: error: class Kadai is public, should be declared in a file named Kadai.java
public class Kadai {
^
1 error
|
s470398970 | p01102 | Java | import java.util.ArrayList;
import java.util.Scanner;
/**
* Kadai
*/
public class Main {
public void go() {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String lines0;
String lines1String;
lines0 = sc.nextLine();
if (lines0.equal... | Main.java:18: error: cannot find symbol
lines1 = sc.nextLine();
^
symbol: variable lines1
location: class Main
Main.java:20: error: cannot find symbol
if (lines0.equals(lines1)) {
^
symbol: variable lines1
location: class Main
Main.java:24: e... |
s916252901 | p01102 | Java | import java.util.ArrayList;
import java.util.Scanner;
/**
* Kadai
*/
public class Main {
public void go() {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String lines0;
String lines1;
lines0 = sc.nextLine();
if (lines0.equals(".")... | Main.java:35: error: cannot find symbol
close++;
^
symbol: variable close
location: class Main
Main.java:37: error: cannot find symbol
close = 2;
^
symbol: variable close
location: class Main
Main.java:43: error:... |
s159902550 | p01102 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String str1 = scan.nextLine();
while(!str1.equals(".")){
String str2 = scan.nextLine();
if(str1.equals(str2)){
System.out.println("IDENTICAL");
}else{
int dcnt1 = 0;
in... | Main.java:61: error: cannot find symbol
}else if(!tmp1.equals(tmp2) && dcnt != 0){
^
symbol: variable dcnt
location: class Main
1 error
|
s759190256 | p01102 | Java |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main2 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String[] s = new String[2];
while(true)
{
s[0] = scan.next();
if(s[0].equals(".")) {break;}
s[1] = scan.next();
... | Main.java:7: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s351440742 | p01102 | Java |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main2 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String[] s = new String[2];
while(true)
{
s[0] = scan.next();
if(s[0].equals(".")) {break;}
s[1] = scan.next();
... | Main.java:7: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s760498050 | p01102 | Java |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main2 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String[] s = new String[2];
while(true)
{
s[0] = scan.next();
if(s[0].equals(".")) {break;}
s[1] = scan.next();
L... | Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s908212622 | p01102 | Java |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main2 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String[] s = new String[2];
while(true)
{
s[0] = scan.next();
if(s[0].equals(".")) {break;}
s[1] = scan.next();
L... | Main.java:6: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s381110293 | p01102 | Java |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main2 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String[] s = new String[2];
while(true)
{
s[0] = scan.next();
if(s[0].equals(".")) {break;}
s[1] = scan.next();
... | Main.java:7: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
^
1 error
|
s926945444 | p01102 | C | #include <stdio.h>
#include <string.h>
int main()
{
char input_str1[200], input_str2[200];
char seq1[200], seq2[200];
int wrong_counter, different_counter;
int char_num_i, char_num_j;
for( ; ; )
{
wrong_counter = 0;
different_counter = 0;
char_num_i = 0;
char_num_j = 0;
memset(seq1, '\... | main.c: In function 'main':
main.c:47:9: error: 'print_counter' undeclared (first use in this function); did you mean 'wrong_counter'?
47 | print_counter = 1;
| ^~~~~~~~~~~~~
| wrong_counter
main.c:47:9: note: each undeclared identifier is reported only once for each function it a... |
s544238867 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[200], s2[200];
int i=0,cnt,jud;
while (1) {
cnt = 0;
jud = 0;
i = 0;
scanf_s("%s", s1);
scanf_s("%s", s2);
if (s1[0] == '.') {
break;
}
while (s1[i] != EOF) {
if ((s1[i] != s2[i]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';') {
... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | scanf_s("%s", s1);
| ^~~~~~~
| scanf
|
s769814514 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[200], s2[200];
int i=0,cnt,jud;
while (1) {
cnt = 0;
jud = 0;
i = 0;
gets("%s", s1);
gets("%s", s2);
if (s1[0] == '.') {
break;
}
while (s1[i] != EOF) {
if ((s1[i] != s2[i]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';') {
cnt =... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | gets("%s", s1);
| ^~~~
| fgets
|
s488130722 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[200], s2[200];
int i=0,cnt,jud;
while (1) {
cnt = 0;
jud = 0;
i = 0;
gets(s1);
gets(s2);
if (s1[0] == '.') {
break;
}
while (s1[i] != EOF) {
if ((s1[i] != s2[i]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';') {
cnt = 0;
}
}... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | gets(s1);
| ^~~~
| fgets
|
s964996338 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[200], s2[200];
int i=0,cnt,jud;
while (1) {
cnt = 0;
jud = 0;
i = 0;
gets(s1);
gets(s2);
if (s1[0] == '.') {
break;
}
while (s1[i] != EOF) {
if ((s1[i] != s2[i]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';') {
cnt = 0;
}
}... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | gets(s1);
| ^~~~
| fgets
|
s823881812 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[200], s2[200];
int i = 0, cnt, jud;
while (1) {
cnt = 0;
jud = 0;
i = 0;
gets(s1);
if (s1[0] == '.') {
break;
}
gets(s2);
while (s1[i] != '\n') {
if ((s1[i] != s2[i]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';') {
jud = 0;
... | main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
9 | gets(s1);
| ^~~~
| fgets
|
s043348571 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[201], s2[201];
int i = 0, cnt, jud;
while (1) {
cnt = 0;
jud = 0;
i = 0;
j=0;
scanf("%s",s1);
if (s1[0] == '.') {
break;
}
scanf("%s",s2);
while (s1[i] != '\n') {
if ((s1[i] != s2[j]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';')... | main.c: In function 'main':
main.c:9:17: error: 'j' undeclared (first use in this function)
9 | j=0;
| ^
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:47: error: expected ';' before 'jud'
30 | ... |
s934688170 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[201], s2[201];
int i = 0, cnt, jud,j;
while (1) {
cnt = 0;
jud = 0;
i = 0;
j=0;
scanf("%s",s1);
if (s1[0] == '.') {
break;
}
scanf("%s",s2);
while (s1[i] != '\n') {
if ((s1[i] != s2[j]) && (jud == 0)) {
cnt++;
jud = 1;
}
if (s1[i] == ';... | main.c: In function 'main':
main.c:30:47: error: expected ';' before 'jud'
30 | }while(s1[i]!=';')
| ^
| ;
31 | jud=0;
| ... |
s817643653 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[201], s2[201];
int i = 0, cnt, jud,j;
while (1) {
cnt = 0;
jud = 0;
i = 0;
j=0;
fgets(s1,seizeof(s1),stdin);
//scanf("%s",s1);
if (s1[0] == '.') {
break;
}
fgets(s2,sizeof(s2),stdin);
//scanf("%s",s2);
while (s1[i] != '\n') {
if ((s1[i] != s2[j])... | main.c: In function 'main':
main.c:10:26: error: implicit declaration of function 'seizeof' [-Wimplicit-function-declaration]
10 | fgets(s1,seizeof(s1),stdin);
| ^~~~~~~
|
s427362901 | p01102 | C | #include<stdio.h>
int main(void) {
char s1[300], s2[300];
int i = 0, cnt, jud,j;
while (1) {
cnt = 0;
jud = 0;
i = 0;
j = 0;
fgets(s1,sizeof(s1),stdin);
//scanf("%s",s1);
if (s1[0] == '.') {
break;
}
fgets(s2,sizeof(s2),stdin);
//scanf("%s",s2);
while (s1[i] != '\0'||s2[j:!='\0']) {
print... | main.c: In function 'main':
main.c:17:43: error: expected ']' before ':' token
17 | while (s1[i] != '\0'||s2[j:!='\0']) {
| ^
| ]
|
s686529986 | p01102 | C | #include <stdio.h>
#include <string.h>
int main(void) {
char str1[201], str2[201];
bool flag;
int i, j, count;
while(1) {
scanf("%s", str1);
if(str1[0] == '.' && str1[1] == '\0') break;
scanf("%s", str2);
if(strcmp(str1, str2) == 0){
printf("IDENTICAL\n");
continue;
}
flag = false;
i = j = c... | main.c: In function 'main':
main.c:6:9: error: unknown type name 'bool'
6 | bool flag;
| ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include <string.h>
+++ |+#include <stdbool.h>
3 |
main.c:19:24: e... |
s969461091 | p01102 | C | #include <stdio.h>
#include <string.h>
int main(void) {
char str1[201], str2[201];
int flag;
int i, j, count;
while(1) {
scanf("%s", str1);
if(str1[0] == '.' && str1[1] == '\0') break;
scanf("%s", str2);
if(strcmp(str1, str2) == 0){
printf("IDENTICAL\n");
continue;
}
flag = false;
i = j = co... | main.c: In function 'main':
main.c:19:24: error: 'false' undeclared (first use in this function)
19 | flag = false;
| ^~~~~
main.c:3:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include <string.h>
... |
s396678639 | p01102 | C | #include <stdio.h>
#include <string.h>
int main()
{
int i,j,k,l1,l2,l,f1,f2;
char s1[200]={'\0'},s2[200]={'\0'},buf[200]={'\0'};
int l1,l2,l;
int c,flag;
/*
for(i=0;i<200;i++){
s1[i] = '\0';
s2[i] = '\0';
buf[i] = '\0';
}
*/
while(1){
flag = c = 0;
scanf("%s",s1);
if( strcmp(s1,".") == 0 ) break;
... | main.c: In function 'main':
main.c:8:13: error: redeclaration of 'l1' with no linkage
8 | int l1,l2,l;
| ^~
main.c:6:19: note: previous declaration of 'l1' with type 'int'
6 | int i,j,k,l1,l2,l,f1,f2;
| ^~
main.c:8:16: error: redeclaration of 'l2' with n... |
s991391705 | p01102 | C | #include <cstdio>
#define MAX_L 200
char s1[MAX_L+1],s2[MAX_L+1];
void solve(){
int flag=0;
while(1){
scanf("%s",s1);
if(s1[0]=='.')return;
scanf("%s",s2);
char *f=s1,*s=s2;
while(1){
if(*f==*s){
if(*f=='\0'){
if(flag==1)printf("CLOSE\n");
else if(flag>1)printf("DIFFERENT\n");
else p... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s919762189 | p01102 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;
namespace AtTest.HCPC2019_15
{
class C
{
static void Main(string[] args)
{
Method(args);
}
static void Method(string[] args)
... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s674741626 | p01102 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
void split(string &s, vector<string> &v) {
s += '"';
string buf = "";
for (int i = 0; i < s.size(); i++) {
if (s[i] == '"') {
v.push_back(buf);
buf = "";
}
else buf += s[i];
}
}
int main() {
while (1) {
string S1, S2;
cin... | a.cc: In function 'int main()':
a.cc:61:2: error: expected '}' at end of input
61 | }
| ^
a.cc:19:12: note: to match this '{'
19 | int main() {
| ^
|
s532148762 | p01102 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
void split(string s, vector<string> &v) {
s += '"';
string buf = "";
for (int i = 0; i < s.size(); i++) {
if (s[i] == '"') {
v.push_back(buf);
buf = "";
}
else buf += s[i];
}
}
int main() {
while (1) {
string S1, S2;
cin ... | a.cc: In function 'int main()':
a.cc:44:50: error: expected ';' before ':' token
44 | goto next:
| ^
| ;
a.cc:44:50: error: expected primary-expression before ':' toke... |
s984107141 | p01102 | C++ | #include<iostream>
using namespace std;
int main(){
while(true){
char s1[200], s2[200];
cin >> s1;
if(s1[0] == '.' && s1[1] == '\0'){
break;
}
cin >> s2;
bool isClose = false, isDifferent = false;
bool isInsideBlock = false;
int s1Offset = 0, s2Offset = 0;
for(int i = 0; i < 200; i++){
if(isIn... | a.cc: In function 'int main()':
a.cc:41:23: error: 'i' was not declared in this scope
41 | if(s1[i + s1Offset] == '\0' && s2[i + s1Offset] == '\0'){
| ^
|
s441030925 | p01102 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
while(1){
string s1;
cin>>s1;
if(s1==".")
break;
string s2;
cin>>s2;
if(s1==s2){
cout<<"IDENTICAL"<<endl;
}
string t1=s1;
string t2=s2;
while(true){
size_t d1b=t1.find('\"');
if(d1b==string::npos)
brea... | a.cc:54:22: error: stray '`' in program
54 | else{`
| ^
|
s099479503 | p01102 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
while(true){
string s1;
cin>>s1;
if(s1=="."){
break;
}
string s1;
cin>>s1;
if(s1==s2){
cout<<"IDENTICAL"<<endl;
continue;
}
string t1=s1;
string t2=s2;
while(true){
size_t d1b=t1.find('\"');
if(d1b==string::npo... | a.cc: In function 'int main()':
a.cc:12:24: error: redeclaration of 'std::string s1'
12 | string s1;
| ^~
a.cc:7:24: note: 'std::string s1' previously declared here
7 | string s1;
| ^~
a.cc:14:24: error: 's2' was not declar... |
s174987344 | p01102 | C++ | #include <iostream>
#include "string"
using namespace std;
int main(){
while(1){
string s1;
cin>>s1;
if(s1==".") break;
string s2;
cin>>s2;
if(s1==s2){
cout<<"IDENTIAL"<<endl;
continue;
}
string t1=s1;
string t2=s2;
while (1) {
size_t d1b=t1.find('??\"');
if(d1b==string::npos) b... | a.cc:26:44: warning: multi-character character constant [-Wmultichar]
26 | size_t d1b=t1.find('??\"');
| ^~~~~~
a.cc:30:44: warning: multi-character character constant [-Wmultichar]
30 | size_t d1b=t1.find('??\"');
... |
s276675518 | p01102 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
while(1){
string s1,s2;
cin>>s1>>s2;
if(s1=="."){
break;
}
if(s1==s2){
cout<<"IDENTICAL"<<endl;
}
string t1=s1;
string t2=s2;
while(1){
size_t d1b=t1.find('\"');
if(dib==string::npos){
break;
}
t1.... | a.cc: In function 'int main()':
a.cc:23:28: error: 'dib' was not declared in this scope; did you mean 'd1b'?
23 | if(dib==string::npos){
| ^~~
| d1b
a.cc:56:9: error: 'return0' was not declared in this scope
56 | ret... |
s615143180 | p01102 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
while(true){
string s1;
cin>>s1;
if(s1=='.'){
break;
}
string s2;
cin>>s2;
if(s1==s2){
cout<<"IDENTICAL"<<endl;
continue;
}
string f1=s1;
string f2=s2;
while(true){
size_t d1b =t1.find('\"');
if(d1b==string::nops)
... | a.cc: In function 'int main()':
a.cc:13:14: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
13 | if(s1=='.'){
| ~~^~~~~
| | |
| | char
| std::string {aka std::__cxx11... |
s564590044 | p01102 | C++ | #include <bits/stdc++.h>
#define MOD 1000000007
#define INF (0x7fffffff)
#define NINF (1<<31)
#define INFL (0x7fffffffffffffff)
#define NINFL (1LL<<63)
#define MAX 100000000
#define pe(str) return cout<<(str)<<endl,0
#define px(str) cout<<(str)<<endl,exit(0)
#define accu(ac,v) cout<<setprecision(ac)<<v<<endl
#define ... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > scan(std::string)':
a.cc:89:1: warning: no return statement in function returning non-void [-Wreturn-type]
89 | }
| ^
a.cc: In function 'int main()':
a.cc:142:1: error: jump to label 'NET'
142 | NET:;
| ^~~
a.cc:129:77: note: from here... |
s775203315 | p01102 | C++ | #include <bits/stdc++.h>
#define MOD 1000000007
#define INF (0x7fffffff)
#define NINF (1<<31)
#define INFL (0x7fffffffffffffff)
#define NINFL (1LL<<63)
#define MAX 100000000
#define pe(str) return cout<<(str)<<endl,0
#define px(str) cout<<(str)<<endl,exit(0)
#define accu(ac,v) cout<<setprecision(ac)<<v<<endl
#define ... | a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > scan(std::string)':
a.cc:89:1: warning: no return statement in function returning non-void [-Wreturn-type]
89 | }
| ^
a.cc: In function 'int main()':
a.cc:142:1: error: jump to label 'NET'
142 | NET:;
| ^~~
a.cc:129:77: note: from here... |
s858139421 | p01102 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
while(1){
string row1,row2;
string period(".");
string cover("\"");
cin>>row1;
if(row1 == period){
break;
}
cin>>row2;
if(row1 == row2){
cout<<"IDENTICAL"<<endl;
}
else{
... | a.cc: In function 'int main()':
a.cc:74:28: error: 'Sizex' was not declared in this scope; did you mean 'Size2'?
74 | for(int i = 0;i <= Sizex;++i){
| ^~~~~
| Size2
|
s795828566 | p01102 | C++ | #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
string s1, s2;
int main() {
while (1) {
int count = 0;
int n1 = 0;
int n2 = 0;
int error = 0;
cin >> s1 >> s2;
if(s1 == '.')
break;
if(s1 == s2) {
cout << "IDENTICAL" << endl;
break;
... | a.cc: In function 'int main()':
a.cc:17:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
17 | if(s1 == '.')
| ~~ ^~ ~~~
| | |
| | char
| std::string {aka std::__cxx11::basic_strin... |
s345929074 | p01102 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
while(1){
string row1,row2;
string period(".");
string cover("/"");
string none("");
cin>>row1;
if(row1 == period){
break;
}
cin>>row2;
if(row1 == row2){
cout<<"IDENTICAL"<<end... | a.cc:12:21: warning: missing terminating " character
12 | string cover("/"");
| ^
a.cc:12:21: error: missing terminating " character
12 | string cover("/"");
| ^~~
a.cc: In function 'int main()':
a.cc:12:21: error: expected ')' before 'string'
12 | ... |
s779377139 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=NULL){
s1.push_back(str1[i]);
i++;
... | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str1);
| ^~~~
| getw
a.cc:13:32: warning: NULL used in arithmetic [-Wpointer-arith]
13 | while(str1[i]!=NULL){
... |
s948381475 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=NULL){
s1.push_back(str1[i]);
i++;
... | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str1);
| ^~~~
| getw
a.cc:13:32: warning: NULL used in arithmetic [-Wpointer-arith]
13 | while(str1[i]!=NULL){
... |
s737442656 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=NULL){
s1.push_back(str1[i]);
i++;
... | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str1);
| ^~~~
| getw
a.cc:13:32: warning: NULL used in arithmetic [-Wpointer-arith]
13 | while(str1[i]!=NULL){
... |
s415013587 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=NULL){
s1.push_back(str1[i]);
i++;
... | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str1);
| ^~~~
| getw
a.cc:13:32: warning: NULL used in arithmetic [-Wpointer-arith]
13 | while(str1[i]!=NULL){
... |
s770619155 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<stdio.h>
#include<cstdio>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=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(str1);
| ^~~~
| getw
a.cc:15:32: warning: NULL used in arithmetic [-Wpointer-arith]
15 | while(str1[i]!=NULL){
... |
s928113782 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<stdio.h>
#include<cstdio>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=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(str1);
| ^~~~
| getw
a.cc:15:32: warning: NULL used in arithmetic [-Wpointer-arith]
15 | while(str1[i]!=NULL){
... |
s416977175 | p01102 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<stdio.h>
#include<cstdio>
int main(){
int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
std::string s1;
std::string s2;
std::vector<std::string> ans;
char str1[200],str2[200];
while(1){
gets(str1);
i=0;
while(str1[i]!=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(str1);
| ^~~~
| getw
a.cc:15:32: warning: NULL used in arithmetic [-Wpointer-arith]
15 | while(str1[i]!=NULL){
... |
s613973192 | p01102 | C++ | #include<iostream>
#include<string>
using namespace std;
main() {
while (true) {
string a, b;
cin >> a;
if (a[0] == ".") {
break;
}
cin >> b;
if (a == b) {
cout << "IDENTICAL" << endl;
continue;
}
int modea = 0, modeb = 0;
int i = 0, j = 0, k = 0, c = 0;
while(true){
if (a[i+j] == '"') ... | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:8:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if (a[0] == ".") {
a.cc:20:33: error: 'swich' was not declar... |
s429900301 | p01102 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
while (true) {
string a, b;
cin >> a;
if (a[0] == ".") {
break;
}
cin >> b;
if (a == b) {
cout << "IDENTICAL" << endl;
continue;
}
int modea = 0, modeb = 0;
int i = 0, j = 0, k = 0, c = 0;
while(true){
if (a[i+j] == '... | a.cc: In function 'int main()':
a.cc:8:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if (a[0] == ".") {
|
s925963697 | p01102 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s597958672 | p01102 | C++ | while True:
s1 = input()
if s1 == '.':
break
s2 = input()
if s1 == s2:
print("IDENTICAL")
continue
s2 = s2.split('"')
s1 = s1.split('"')
# print(s1)
# print(s2)
count = 0
isTmp = False
if s1[0] == '"' and s2[0] == '"':
isTmp = True
for i... | a.cc:13:7: error: invalid preprocessing directive #print
13 | # print(s1)
| ^~~~~
a.cc:14:7: error: invalid preprocessing directive #print
14 | # print(s2)
| ^~~~~
a.cc:1:1: error: expected unqualified-id before 'while'
1 | while True:
| ^~~~~
a.cc:32:21: error: expected ... |
s779456831 | p01102 | C++ | #include <iostream>
#include <string>
using namespace std;
int n,m,l;
string s1, s2;
void input() {
cin >> s1;
if (s1 == ".")return;
cin >> s2;
}
void output() {
cout << endl;
}
void prep() {
n = s1.length();
m = s2.length();
s1 = s1 + "$";
s2 = s2 + "$";
}
void solve() {
int i = 0;
int j = 0;
int h = 1;
in... | a.cc: In function 'void solve()':
a.cc:41:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '_Equal'
41 | if (c1._Equal(c2) == false) {
| ^~~~~~
|
s650487307 | p01102 | C++ | #include <iostream>
#include <string>
using namespace std;
int n,m,l;
string s1, s2;
void input() {
cin >> s1;
if (s1 == ".")return;
cin >> s2;
}
void output() {
cout << endl;
}
void prep() {
n = s1.length();
m = s2.length();
s1 = s1 + "$";
s2 = s2 + "$";
}
void solve() {
int i = 0;
int j = 0;
int h = 1;
in... | a.cc: In function 'void solve()':
a.cc:41:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '_Equal'
41 | if (c1._Equal(c2) == false) {
| ^~~~~~
|
s803741140 | p01102 | C++ | #include <iostream>
#include <string>
using namespace std;
int n,m,l;
string s1, s2;
void input() {
cin >> s1;
if (s1 == ".")return;
cin >> s2;
}
void output() {
cout << endl;
}
void prep() {
n = s1.length();
m = s2.length();
s1 = s1 + "$";
s2 = s2 + "$";
}
void solve() {
int i = 0;
int j = 0;
int h = 1;
in... | a.cc: In function 'void solve()':
a.cc:41:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '_Equal'
41 | if (c1._Equal(c2) == false) {
| ^~~~~~
|
s445360693 | p01102 | C++ | print"hello";print123
print"hello";print123
read"B1input";solve;output;
read"B2";solve;output;
read"C1";solve;output"C1ans";
read"C2";solve;output"C2ans";
""""""""
"""42"""""
slow"program"
fast"code"
"super"fast"program"
"super"faster"program"
X""
X
I"S""CREAM"
I"CE""CREAM"
11"22"11
1"33"111
.
| a.cc:1:1: error: 'print' does not name a type; did you mean 'int'?
1 | print"hello";print123
| ^~~~~
| int
a.cc:1:14: error: 'print123' does not name a type
1 | print"hello";print123
| ^~~~~~~~
a.cc:2:14: error: 'print123' does not name a type
2 | print"hello";print123
|... |
s479868271 | p01103 | Java | import java.util.*;
public class C {
public static void main(String arg[]){
while(true){
Scanner cs=new Scanner(System.in);
int ans=0;
int n=cs.nextInt();
int m=cs.nextInt();
if (n==0)break;
int a[][]=new int[n+1][m+1];
int s[][]=new int[n+1][m+1];
for (int i=1;i<=n;i++)
for(int j=1;j<=m;... | Main.java:2: error: class C is public, should be declared in a file named C.java
public class C {
^
1 error
|
s390893036 | p01103 | Java | import java.util.*;
public class C {
public static void main(String arg[]){
while(true){
Scanner cs=new Scanner(System.in);
int ans=0;
int n=cs.nextInt();
int m=cs.nextInt();
if (n==0)break;
int a[][]=new int[n+1][m+1];
int s[][]=new int[n+1][m+1];
for (int i=1;i<=n;i++)
for(int j=1;j<=m;... | Main.java:2: error: class C is public, should be declared in a file named C.java
public class C {
^
1 error
|
s937760855 | p01103 | C | #include <stdio.h>
int main()
{
int input_d, input_w;
int input_e[10][10];
int okuyuki, haba;
int moving_yoko, moving_tate;
int counter_i, counter_j;
for( ; ; )
{
int in_max_height = 0, out_min_height = 9;
int sum_deepth = 0, max_deepth = 0;
scanf("%d %d", &input_d, &input_w);
if(input_... | main.c: In function 'main':
main.c:65:83: error: expected ')' before ';' token
65 | sum_deepth = sum_deepth - (out_min_height * (okuyuki + 1) * (haba + 1);
| ~ ^
| ... |
s450005778 | p01103 | C | #include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
const int AX = 20+6;
int a[AX][AX];
int d , w ;
int mark[AX][AX];
struct Node{
int x , y ;
};
int res ;
int vis[AX][AX];
int main(){
while( scanf("%d%d",&d,&w) && d && w ){
for( int i = 0 ; i < d; i++ ){
for( int j = 0 ; j < w ; j++ ){
s... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s631426291 | p01103 | C | #include <iostream>
#include <cstdio>
#define INF 0x3f3f3f3f
using namespace std;
const int AX = 20+6;
int a[AX][AX];
int d , w ;
int res ;
int main(){
while( scanf("%d%d",&d,&w) && d && w ){
for( int i = 0 ; i < d; i++ ){
for( int j = 0 ; j < w ; j++ ){
scanf("%d",&a[i][j]);
}
}
res = 0 ;
for( int... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s192795249 | p01103 | C | #include<stdio.h>
int main(void) {
int i, j, d, w, e[10][10], ds, ws, dl, wl, x, y, min, max, total, res;
while (1) {
res = 0;3
scanf("%d", &d);
scanf("%d", &w);
if ((d == 0) && (w == 0)) {
break;
}
for (i = 0; i < d; i++) {
for (j = 0; j < w; j++) {
scanf("%d", &e[i][j]);
}
}
for (ds = 0... | main.c: In function 'main':
main.c:5:26: error: expected ';' before 'scanf'
5 | res = 0;3
| ^
| ;
6 | scanf("%d", &d);
| ~~~~~
|
s113929092 | p01103 | C | #include<stdio.h>
int main(void){
int a,b;
int c[1001][1001],i,j;
int l,m,n,x1,y1,x2,y2,o,p,max;
while(1){
scanf("%d %d",&a,&b);
if(a==0&&b==0){
break;
}
for(i=0;i<a;i++){
for(j=0;j<b;j++){
scanf("%d",&c[i][j]);
}
}
max=0;
for(x2=2;x2<d;x2++)... | main.c: In function 'main':
main.c:25:17: error: 'd' undeclared (first use in this function)
25 | for(x2=2;x2<d;x2++){
| ^
main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:19: error: 'w' undeclared (first use in this function)
... |
s068301256 | p01103 | C++ | #include <bits/stdc++.h>
using namespace std;
const int highest=100;
int gerden[11][11];
int main(){
int d, w;
while(cin >> d >> w){
if(d==0 && w==0) break;
for(int i=0; i<d; i++){
for(int j=0; j<w; j++){
cin >> gerden[i][j];
}
}
int an... | a.cc:20:41: error: stray '\' in program
20 | for(int j=3; j<=w; j++){ \\ 縦i横jの池候補
| ^
a.cc:20:42: error: stray '\' in program
20 | for(int j=3; j<=w; j++){ \\ 縦i横jの池候補
| ^
a.cc:22:50: error: ... |
s915449520 | p01103 | C++ | #include <iostream>
using namespace std;
int d, w;
int cap = 0;
int e[10][10];
int hight_of_ike(int sx, int sy, int col, int row) {
int suii = e[sy][sx];
for (int y = sy; y <= sy + col; ++y) {
for (int x = sx; x <= sx + row; ++x) {
suii = max(suii, e[y][x]);
}
}
return suii... | a.cc: In function 'int main()':
a.cc:52:29: error: 'sto' was not declared in this scope; did you mean 'std'?
52 | if (sto - ike > 0) {
| ^~~
| std
|
s598283425 | p01103 | C++ | #include<iostream>
int main()
{
int d,w;
int e[100][100]={0};
int min=10;
int in=0;
int x=0;
int ans;
while(d>0 && w>0){
std::cin>>d>>w;
if(d==0 && w==0) break;
for(int i=0;i<d;i++){
for(int j=0;j<w;j++){
std::cin>>e[i][j];
}
}
for(int i=0;i<d-2;i++){
for(int j=i+2;j<d;j++){
for(int ... | a.cc: In function 'int main()':
a.cc:39:67: error: 'tmp' cannot be used as a function
39 | if(min>max && (tmp(min*x-in))>ans){
| ~~~^~~~~~~~~~
|
s270683937 | p01103 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.