submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s428787562 | p03835 | C++ | #include<bits/stc++.h>
using namespace std;
int K, S;
int main () {
cin >> K >> S;
int count = 0;
for (int x = 0; x <= K; x++){
for (int y = 0; y <= K; y++){
if (((S-x-y) <= K) && ((S-x-y) >= 0) {
count++;
}
}
}
} | a.cc:1:9: fatal error: bits/stc++.h: No such file or directory
1 | #include<bits/stc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s542494248 | p03835 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <queue>
typedef long long ll;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define mod 1000000007
int main(){
int K,S;
cin >> K >> S;
int ans = 0;
for(int x = 0; x <= K; x++){
for(int... | a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:12:11: note: to match this '{'
12 | int main(){
| ^
|
s988279362 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int k, s;
cin >> k >> s;
int cnt = 0;
for(int a = 0; a <= k; a++){
for(int b = 0; b <= k; b++){
if(s - a - b <= k)
cnt++;
}
}
}
cout << cnt << endl;
}
| a.cc:18:3: error: 'cout' does not name a type
18 | cout << cnt << endl;
| ^~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s869078226 | p03835 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
int k,s;
cin >> k >> s;
int ans = 0;
REP... | a.cc: In function 'int main()':
a.cc:25:28: error: 'cnt' was not declared in this scope; did you mean 'int'?
25 | if(s-(x+y) <= k) cnt++;
| ^~~
| int
|
s963309987 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
bool po(int x,int K){
if (0<=x && x<= K){
return true;
}
else{
return false;
}
}
int sum(int K,int S){
int z=0,count=0;
for(int x =0;po(x,K);x++){
for(int y=0;po(y,K);y++){
for(;po(z,K);z++){
if(x+y+z == S){
count++;
... | a.cc: In function 'int main()':
a.cc:37:24: error: expected '}' at end of input
37 | cout<<sum(K,S)<<endl;
| ^
a.cc:34:11: note: to match this '{'
34 | int main(){
| ^
|
s413579052 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int k, s;
cin >> k >> s;
int ans=0;
for(int i=0; i<=k; i++){
for(int j=0; j<=k; j++){
int z = s-i-j;
if(0<=z && z<=k){
ans++;
}
}
}
}
cout << ans ... | a.cc:16:5: error: 'cout' does not name a type
16 | cout << ans << endl;
| ^~~~
a.cc:17:5: error: expected unqualified-id before 'return'
17 | return 0;
| ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
18 | }
| ^
|
s379484272 | p03835 | C++ | #include<iostream>
using namespace std;
int main(){
int x,y,z;
int K,S;
int pattern;
cin >> K >> S;
for(x=0;x<=K;x++){
for(y=0;y<=K;y++){
z = S - x - y;
if( (x+y+z) == S) pattern++;
}
}
cout << pattern < endl;
} | a.cc: In function 'int main()':
a.cc:19:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
19 | cout << pattern < endl;
| ~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:48,
from /usr/includ... |
s631769385 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y,z;
int K,S;
int pattern=0;
cin >> K >> S;
for(x=0;x<=K;x++){
for(y=0;y<=K;y++){
for(z=0;z<=K;z++){
if(x+y+z == S)
pattern++;
}
}
}
cout << pattern << endl;
}
}
cout << pattern << endl;... | a.cc:24:3: error: expected declaration before '}' token
24 | }
| ^
a.cc:26:3: error: 'cout' does not name a type
26 | cout << pattern << endl;
| ^~~~
a.cc:28:1: error: expected declaration before '}' token
28 | }
| ^
|
s520344904 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y,z;
int K,S;
int pattern=0;
cin >> K >> S;
for(x=0;x<=2500;x++){
for(y=0;y<=2500;y++){
for(z=0;z<=2500;z++){
if(x+y+z = S)
pattern++;
}
}
}
cout << pattern << endl;
} | a.cc: In function 'int main()':
a.cc:15:15: error: lvalue required as left operand of assignment
15 | if(x+y+z = S)
| ~~~^~
|
s902299889 | p03835 | C | #include<stdio.h>
int main(){
int x,y,z;
int i,j;
int k,s;
int ans=0;
scanf("%d %d",&k,&s);
for(i=0;i<=k;i++){
for(j=0;j<=k;j++){
z=s-x-y;
if(z>=0&&z<=k)ans++
}
}
printf("%d\n",ans);
return 0;
} | main.c: In function 'main':
main.c:11:26: error: expected ';' before '}' token
11 | if(z>=0&&z<=k)ans++
| ^
| ;
12 | }
| ~
|
s040606002 | p03835 | C | #include<stido.h>
int main(){
int x,y,z;
int i,j,l;
int k,s;
int n=0;
scanf("%d %d",&k,&s);
for(i=0;i<=k;i++){
for(j=0;j<=k;j++){
for(l=0;l<=k;l++){
if(i+j+l==s)n++;
}
}
}
printf("%d\n",n);
return 0;
} | main.c:1:9: fatal error: stido.h: No such file or directory
1 | #include<stido.h>
| ^~~~~~~~~
compilation terminated.
|
s137166060 | p03835 | C | #include<stido.h>
int main(){
int x,y,z;
int i,j,l;
int k,s;
scanf("%d %d",&k,&s);
for(i=0;i<=k;i++){
for(j=0;j<=k;j++){
for(l=0;l<=k;l++){
if(i+j+l==s)s++;
}
}
}
printf("%d\n",s);
return 0;
} | main.c:1:9: fatal error: stido.h: No such file or directory
1 | #include<stido.h>
| ^~~~~~~~~
compilation terminated.
|
s912259017 | p03835 | C++ | #include<bits/stdc++.h>
using namespsace std;
int main()
{
int i,j,k,s;
cin>>k>>s;
int ans=0;
for(i=0;i<=k;++i)
{
for(j=0;j<=k;++j)
{
if(s-(i+j)>=0 && s-(i+j)<=k)
++ans;
}
}
cout<<ans<<endl;
return 0;
} | a.cc:3:7: error: expected nested-name-specifier before 'namespsace'
3 | using namespsace std;
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin>>k>>s;
| ^~~
| std::cin
In file included from /usr/incl... |
s298881469 | p03835 | C++ | num = input().split()
k = int(num[0])
s = int(num[1])
#print(k)
#print(s)
import numpy as np
x = np.arange(k+1)
y = np.arange(k+1).reshape(k+1,1)
z = np.arange(k+1)
xy = x + y
count =0
#l=0
for i in range(k+1) :
for j in range(k+1) :
a = x + xy[i][j]
count +=np.count_nonzero(a == s)
#l... | a.cc:6:2: error: invalid preprocessing directive #print
6 | #print(k)
| ^~~~~
a.cc:7:2: error: invalid preprocessing directive #print
7 | #print(s)
| ^~~~~
a.cc:17:2: error: invalid preprocessing directive #l
17 | #l=0
| ^
a.cc:22:10: error: invalid preprocessing directive #l
22 | ... |
s489129544 | p03835 | C++ | #include<iostream>
using namespace std;
int k,s,cnt=0;
int main()
{
cin>>k>>s;
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;y++)
{
for(int z=0;z<=k;z++) if(x+y+z==s) cnt++;
}
}
cout<<cnt<<endl;
return 0; | a.cc: In function 'int main()':
a.cc:15:14: error: expected '}' at end of input
15 | return 0;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s715807327 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int k,s;
cin >> k >> s;
int df = 0;
for(int x = 0;x <= k;x++){
for(int y = 0;y <= k && x + y <= s;y++){
if(x + y + k >= s){
df++;
}
}
}
}
cout << df << endl;
}
| a.cc:15:1: error: 'cout' does not name a type
15 | cout << df << endl;
| ^~~~
a.cc:16:1: error: expected declaration before '}' token
16 | }
| ^
|
s024647223 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<(n);i++)
int main(){
int k, s, ans = 0;
cin >> k >> s;
for(int i = 0; i <= k; i++) for(int j = 0; j <= k - i; j++) {
if(0 <= s - i - j && s - i - j <= k) ans++;
}
cout << ans << e#include <bits/stdc++.h>
using namespace std;
... | a.cc:12:19: error: stray '#' in program
12 | cout << ans << e#include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:12:18: error: 'e' was not declared in this scope
12 | cout << ans << e#include <bits/stdc++.h>
| ^
a.cc:17:9: warning: empty parentheses... |
s697055616 | p03835 | Java | public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String line = scanner.nextLine();
String[] strings = line.split(" ");
int K = Integer.parseInt(strings[0]);
int S = Integer.parseInt(str... | Main.java:5: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 ... |
s236255278 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int K, S;
int count = 0;
cin >> K >> S;
for(int i = 0; i < K){
for(int j = 0; j < K; j++){
if(0<= S-i-j<=K){
count++;
}
}
}
cout << count << endl;
}
| a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before ')' token
8 | for(int i = 0; i < K){
| ^
| ;
|
s658235604 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int X,Y,Z, K, S, counter;
counter = 0;
cin >> K >> S;
for(X = 0;X<=K;X++){
for(Y = 0;Y<=K;Y++){
for(Z = 0;Z<=K;Z++){
if(X+Y+Z = S)counter+=1;
}
}
}
cout << counter << endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: lvalue required as left operand of assignment
11 | if(X+Y+Z = S)counter+=1;
| ~~~^~
|
s371320520 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int X,Y,Z, K, S, counter;
counter = 0;
cin >> K >> S;
for(X = 0;X<=K;X++){
for(Y = 0;Y<=K;Y++){
for(Z = 0;Z<=K;Z++){
if(X+Y+Z = S)counter+=1;
}
cout << counter << endl;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: lvalue required as left operand of assignment
11 | if(X+Y+Z = S)counter+=1;
| ~~~^~
a.cc:14:2: error: expected '}' at end of input
14 | }
| ^
a.cc:8:22: note: to match this '{'
8 | for(X = 0;X<=K;X++){
| ... |
s248697864 | p03835 | C++ | #include<iostream>
using namespace std;
int k,s,cnt=0;
int main()
{
cin>>k>>s;
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;y++)
{
for(int z=0;z<=k;z++) if(x+y+z==s) cnt++;
}
}
cout<<cnt<<endl;
re | a.cc: In function 'int main()':
a.cc:15:5: error: 're' was not declared in this scope
15 | re
| ^~
a.cc:15:7: error: expected '}' at end of input
15 | re
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s655515799 | p03835 | C++ | #include<iostream>
using namespace std;
int main() {
int K,S,X,Y,Z,total.count=0;
cin >> K >> S;
for (X=0; X<=K; X++) {
for (Y=0; Y<=K; Y++) {
for (Z=0; X<=K; Z++) {
total = X + Y + Z;
if (total == S) count++;
}
}
}
cout << count << endl;
}
| a.cc: In function 'int main()':
a.cc:5:22: error: expected initializer before '.' token
5 | int K,S,X,Y,Z,total.count=0;
| ^
a.cc:12:9: error: 'total' was not declared in this scope
12 | total = X + Y + Z;
| ^~~~~
a.cc:13:25: error: 'count' was not declared in t... |
s769607599 | p03835 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n)+1;i++)
using namespace std;
int main() {
int k, s, ans=0; cin >> k >> s;
rep(a,k+1){
rep(b,k+1) {
int c=S-a-b;
if(0<= c && c<=k) {
ans++;
}
}
}
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:9:15: error: 'S' was not declared in this scope
9 | int c=S-a-b;
| ^
a.cc: At global scope:
a.cc:16:3: error: 'cout' does not name a type
16 | cout << ans << endl;
| ^~~~
a.cc:17:1: error: expected declaration before '}' token
17 | }
... |
s416384543 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, s, ans=0; cin >> k >> s;
for(int h=0;h<k+1;i++){
for(int i=0;i<k+1;i++){
for(int j=0;j<k+1;i++){
int count=h+i+j;
if(count==s)
ans++;
}
}
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:6:21: error: 'i' was not declared in this scope
6 | for(int h=0;h<k+1;i++){
| ^
|
s758327833 | p03835 | C++ | #include <bits/stdc++.h>
for(int i=0;i<n;i++)
using namespace std;
int main() {
int k, s, ans=0; cin >> k >> s;
for(int h=0;h<k+1;i++){
for(int i=0;i<k+1;i++){
for(int j=0;j<k+1;i++){
int count=h+i+j;
if(count==s)
ans++;
}
}
}
cout << ans << endl;
}
| a.cc:2:1: error: expected unqualified-id before 'for'
2 | for(int i=0;i<n;i++)
| ^~~
a.cc:2:13: error: 'i' does not name a type
2 | for(int i=0;i<n;i++)
| ^
a.cc:2:17: error: 'i' does not name a type
2 | for(int i=0;i<n;i++)
| ^
a.cc: In function 'int main()':
a... |
s203088551 | p03835 | C++ | #include<iostream>
using namespace std;
int main(){
int S;
int k;
int c=0;
cin>>S>>K;
for(int X=0;X<=K;X++){
for(int Y=0;Y<=K;Y++){
int Z=S-(X+Y);
if(Z>=0&&Z<=K)
C++;
}
}
cout<<c;
} | a.cc: In function 'int main()':
a.cc:7:17: error: 'K' was not declared in this scope
7 | cin>>S>>K;
| ^
a.cc:12:25: error: 'C' was not declared in this scope
12 | C++;
| ^
|
s664278517 | p03835 | C++ | #include<iostream>
using namespace std;
int main(){
int k,s;
cin>>k>>s;
int x,y=0,z;
int count=0;
for(int i=0;i<=k;i++)
{ x=i;
for(int i=0;i<=k;i++){
z=i;
if(x+y+z==s)
count+=1;
count=count*2;
}
}}
cout<<count;
}
| a.cc:19:17: error: 'cout' does not name a type
19 | cout<<count;
| ^~~~
a.cc:20:9: error: expected declaration before '}' token
20 | }
| ^
|
s113126777 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int K, S;
cin >> K >> S;
int ans = 0;
for(int x = 0; x <= K; x ++){
for(int y = 0; y <= K; y ++){
if(S - x - y <= K){
ans += 1;
}
}
}
}
cout << ans << endl;
} | a.cc:16:3: error: 'cout' does not name a type
16 | cout << ans << endl;
| ^~~~
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s697860843 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int K, S;
cin >> K >> S;
int ans = 0;
for(int x = 0, x <= K, x ++){
for(int y = 0, y <= K, y ++){
for(int z = 0, z <= K, z ++){
if(x+y+z == S){
ans += 1;
}
}
}
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before '<=' token
8 | for(int x = 0, x <= K, x ++){
| ^~~
| ;
a.cc:8:20: error: expected primary-expression before '<=' token
8 | for(int x = 0, x <= K, x ++){
| ^~
a.cc:8:... |
s569539945 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int K, S;
cin >> K >> S;
int ans = ;0
for(int x = 0, x <= K, x ++){
for(int y = 0, y <= K, y ++){
for(int z = 0, z <= K, z ++){
if(x+y+z == S){
ans += 1;
}
}
}
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: expected primary-expression before ';' token
7 | int ans = ;0
| ^
a.cc:7:15: error: expected ';' before 'for'
7 | int ans = ;0
| ^
| ;
8 | for(int x = 0, x <= K, x ++){
| ~~~
|
s849339958 | p03835 | C++ | #include<bits/stdc++.h>
using namespace sts;
int main(){
int K, S;
cin >> K >> S;
int ans = ;0
for(int x = 0, x <= K, x ++){
for(int y = 0, y <= K, y ++){
for(int z = 0, z <= K, z ++){
if(x+y+z == S){
ans += 1;
}
}
}
}
cout << ans << endl;
} | a.cc:2:17: error: 'sts' is not a namespace-name
2 | using namespace sts;
| ^~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> K >> S;
| ^~~
| std::cin
In file included from /usr/include/x86_64-lin... |
s271020580 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int s,k,c=0;
scanf("%d%d",&k,&s);
for(int x=0;0<=x&&x<=k;x++)
{
for (int y=0;0<=y&&y<=k;y++)
{
int z=s-(x+y);
if(z>=0&&z<=k)
{
c++;
}
}
}
printf("%d",c);
| a.cc: In function 'int main()':
a.cc:20:20: error: expected '}' at end of input
20 | printf("%d",c);
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s104801954 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int s,k,c=0;
scanf("%d%d",&k,&s);
for(int x=0;0<=x&&x<=k;x++)
{
for (int y=0;0<=y&&y<=k;y++)
{
int z=s-(x+y);
if(z>=0&&z<=k)
{
c++;
}
}
}
printf("%d",c);
| a.cc: In function 'int main()':
a.cc:20:20: error: expected '}' at end of input
20 | printf("%d",c);
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s190040877 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int k,s,z;
cin>>k>>s;
int c=0;
for(int i=0;i<=k;i++){
for(int j=0;j<=k;j++)
z=s-i-j;
if(s==i+j+z){
if(z>=0&&z<=k){
c+=1;}}
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'j' was not declared in this scope
10 | if(s==i+j+z){
| ^
|
s064641317 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int k,s,z;
cin>>k>>s;
int c=0;
for(int i=0;i<=k;i++){
for(int j=0;j<=k;j++)
z=s-i-j;
if(z>=0&&z<=k){
if(s==i+j+z){
c+=1;}}
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:9: error: 'j' was not declared in this scope
11 | if(s==i+j+z){
| ^
|
s485870355 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int k,s,z;
cin>>k>>s;
int c=0;
for(int i=0;i<=k;i++){
for(int j=0;j<=k;j++)
z=s-i-j;
if(s==i+j+z){
if(z>=0&&z<=k)
c+=1;}
}
cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'j' was not declared in this scope
10 | if(s==i+j+z){
| ^
|
s186147949 | p03835 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
int main(){
ll k,s,c=0;
cin>>k>>s;
for(int i=0;i<=k;i++){
for(int j=0;j<=k;j++){
if(s-i-j>=0 && s-i-j<=k) c++
}
}
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:41: error: expected ';' before '}' token
11 | if(s-i-j>=0 && s-i-j<=k) c++
| ^
| ;
12 | }
| ~
|
s952679004 | p03835 | C++ |
using namespace std;
int main(){
int k,s;
scanf("%d%d",&k,&s);
int cnt=0;
for(int x=0;x<=k;++x)
{
for(int y=0;y<=k;++y){
int z;
z=s-(x+y);
if((z<=k)&&(z>=0))
++cnt;
}
}
printf("%d",cnt);} | a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%d%d",&k,&s);
| ^~~~~
a.cc:17:9: error: 'printf' was not declared in this scope
17 | printf("%d",cnt);}
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>';... |
s501578316 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int k,s,c=0,z;
scanf("%d%d",&k,&s);
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;y++)
{
int z=s-(x+y);
if(z>=0&&z<=k&&(o+x+y)==s)
c++;
}
}
printf("%d",c); | a.cc: In function 'int main()':
a.cc:12:33: error: 'o' was not declared in this scope
12 | if(z>=0&&z<=k&&(o+x+y)==s)
| ^
a.cc:16:27: error: expected '}' at end of input
16 | printf("%d",c);
| ^
a.cc:4:1: note: to mat... |
s595855548 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int k,s,c=0,z;
scanf("%d%d",&k,&s);
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;y++)
{
int z=s-(x+y);
if(z>=0&&z<=k&&(o+x+y) ==s)
c++;
}
}
printf("%d",c);
} | a.cc: In function 'int main()':
a.cc:12:33: error: 'o' was not declared in this scope
12 | if(z>=0&&z<=k&&(o+x+y) ==s)
| ^
|
s249895686 | p03835 | C++ | #include<iostream>
using namespace std;
int main (){
int s,k;
scanf("%d%d",&k,&s);
int c=0vz;
for(int y=0;y<=k;y++){
for(int x=0;x<=k;x++)
{
z=s(y+x);
if (z>=0&&z<=k)
c++;
}
}
printf("%d",c);
} | a.cc: In function 'int main()':
a.cc:6:7: error: unable to find numeric literal operator 'operator""vz'
6 | int c=0vz;
| ^~~
a.cc:12:1: error: 'z' was not declared in this scope
12 | z=s(y+x);
| ^
a.cc:12:4: error: 's' cannot be used as a function
12 | z=s(y+x);
| ~^~~~~
|
s533636734 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main (){
int s,k;
scanf("%d%d",&k,&s);
int c=0,z;
for(int y=0;y<=k;y++){
for(int x=0;x<=k;x++)
{
z=s(y+x);
if (z>=0&&z<=k)
c++;
}
}
printf("%d",c);
} | a.cc: In function 'int main()':
a.cc:12:4: error: 's' cannot be used as a function
12 | z=s(y+x);
| ~^~~~~
|
s593146248 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main (){
int s,k;
scanf("%d%d",&k,&s);
int c=0vz;
for(int y=0;y<=k;y++){
for(int x=0;x<=k;x++)
{
z=s(y+x);
if (z>=0&&z<=k)
c++;
}
}
printf("%d",c);
} | a.cc: In function 'int main()':
a.cc:6:7: error: unable to find numeric literal operator 'operator""vz'
6 | int c=0vz;
| ^~~
a.cc:12:1: error: 'z' was not declared in this scope
12 | z=s(y+x);
| ^
a.cc:12:4: error: 's' cannot be used as a function
12 | z=s(y+x);
| ~^~~~~
|
s547489081 | p03835 | C++ | #include <iostream>
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,count=0;
cin>>n;
for(int i==0;i<n;i++){
int x ,y,z;
cin>>x>>y>>z;
if((x+y+z)>=2)
count++;
}
cout<<count;
return 0;} | a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before '==' token
7 | for(int i==0;i<n;i++){
| ^~
| ;
a.cc:7:18: error: expected primary-expression before '==' token
7 | for(int i==0;i<n;i++){
| ^~
a.cc:7:25: err... |
s129380687 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s,k;
int count =0;
cin >>k>>s;
for(int x=0;x<=k;x++)
{
for( int y=0;y<=k;y++)
{
int z=s-(x+y);
if(z>=0&&z<=k)
count ++;
}
}
cout<<count <<endl;
}
} | a.cc:21:1: error: expected declaration before '}' token
21 | }
| ^
|
s886863384 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s,k;
int count =0;
cin>>k>>s;
for(int i=0;i<=k;i++)
{
for(int y=0;y<=k;i++)
int z=s-(i+y);
if(z>=0&&z<=k)
count ++;
}
cout<<count;
} | a.cc: In function 'int main()':
a.cc:11:4: error: 'z' was not declared in this scope
11 | if(z>=0&&z<=k)
| ^
|
s561604578 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s,k;
int count =0;
cin>>k>>s;
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;i++){
int z=s-(x+y);
if(z>=0&&z<=k)
count ++;
}
}
cout<<count<<"\n"; | a.cc: In function 'int main()':
a.cc:9:18: error: 'i' was not declared in this scope
9 | for(int y=0;y<=k;i++){
| ^
a.cc:15:19: error: expected '}' at end of input
15 | cout<<count<<"\n";
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^... |
s474507172 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s,k;
int count =0;
cin>>k>>s;
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;i++){
int z=s-(x+y);
if(z>=0&&z<=k)
count ++;
}
}
cout<<count<<endl;
} | a.cc: In function 'int main()':
a.cc:10:18: error: 'i' was not declared in this scope
10 | for(int y=0;y<=k;i++){
| ^
|
s531505272 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s,k, count =0;
cin>>k>>s;
for(int i=0;i<=k;i++)
for(int y=0;y<=k;i++)
int z=s-(i+y);
if(z>=0&&z<=k)
count ++;
cout<<count;
} | a.cc: In function 'int main()':
a.cc:9:4: error: 'z' was not declared in this scope
9 | if(z>=0&&z<=k)
| ^
|
s478827163 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int s,k;
int count =0;
cin>>k>>s;
for(int i=0;i<=k;i++)
{
for(int y=0;y<=k;i++){
int z=s-(i+y);
if(z>=0&&z<=k)
count ++;
}
}
cout<<count; | a.cc: In function 'int main()':
a.cc:16:13: error: expected '}' at end of input
16 | cout<<count;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s306564218 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,k;
int count =0;
cin>>x>>k;
for(int i=0;i<=k;i++)
{
for(int y=0;y<=k;i++){
int z=x-(i+y);
if(z>=0&&z<=k)
count ++; | a.cc: In function 'int main()':
a.cc:13:10: error: expected '}' at end of input
13 | count ++;
| ^
a.cc:10:22: note: to match this '{'
10 | for(int y=0;y<=k;i++){
| ^
a.cc:13:10: error: expected '}' at end of input
13 | count ++;
| ^
a.cc:9:1: note: to m... |
s231398796 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,k;
int count =0;
cin>>x>>k;
for(int i=0;i<=k;i++)
{
for(int y=0;y<=k;i++){
int z=s-(i+y);
if(z>=0&&z<=k)
count ++; | a.cc: In function 'int main()':
a.cc:11:7: error: 's' was not declared in this scope
11 | int z=s-(i+y);
| ^
a.cc:13:10: error: expected '}' at end of input
13 | count ++;
| ^
a.cc:10:22: note: to match this '{'
10 | for(int y=0;y<=k;i++){
| ^
a.cc:13:10: e... |
s360241564 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,k;
int count =0;
cin>>x>>k;
for(int i=0;i<=k;i++)
{
for(int y=0;y<=k;i++){
int z=s-(x+y);
if(z>=0&&z<=k)
count ++;
}
}
cout<<count;
} | a.cc: In function 'int main()':
a.cc:11:7: error: 's' was not declared in this scope
11 | int z=s-(x+y);
| ^
|
s785118934 | p03835 | C++ | #include<cstdio>
using namespace std;
int main(void){
int n,s;
int i,j;
int x,cnt;
scanf("%d %d",&n,&s);
cnt=0;
for(i=0;i<=n;i++){
for(j=0;j<=n;j++){
x=s-(i+j);
if(x<=k) cnt++;
}
}
printf("%d\n",cnt);
return 0;
} | a.cc: In function 'int main()':
a.cc:12:31: error: 'k' was not declared in this scope
12 | if(x<=k) cnt++;
| ^
|
s527605654 | p03835 | C++ | 103:29:10 Running Remaining: 64:30:49
Overview
Problem
Status
Rank (103:29:03)
3 Comments
Previous12345…Next
Username
Prob
Result
Time
(ms) Mem
(MB) Lang
Submit Time
MennaMostafa
F
Submit Failed
C++
3 hr ago
MennaMostafa
F
Submit Failed
C++
3 hr ago
MennaMostafa
F
Time Limit Exceeded
C++
1 days ago
MennaMostafa
... | a.cc:7:1: error: extended character … is not valid in an identifier
7 | Previous12345…Next
| ^
a.cc:36:24: error: extended character © is not valid in an identifier
36 | All Copyright Reserved © 2010-2019 Xu Han
| ^
a.cc:37:31: error: invalid digit "9" in octal constant
37 |... |
s714675495 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int k;
int s;
cin>>k;
cin<<s;
if(k==s)
cout<<k*3;
else if(k>s||s>k)
{
cout<<((k+s)%3)-1;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
7 | cin<<s;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:12: ... |
s816207281 | p03835 | C++ |
#include <bits/stdc++.h>
using namespace std;
int main(){
int s,k;
cin>>k>>s;
for(int x=0;x<=k;x++) {
for(int y=0;y<=k;y++) {
int z=s-(x+y);
if((z>=0)&&(z<=k)){
count ++;
}
}
}
cout<<count;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:7: error: no post-increment operator for type
11 | count ++;
| ^~
a.cc:15:5: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
15 | cout<<count;
| ~~~~^~~~~~~
In... |
s844405219 | p03835 | C++ | #include <stdio.h>
int main(){
int i,k,s,ans=0;
scanf("%d%d",&k,&s);
for(int x = 0; x <= k; x++){
for(int y = 0; y <= k; y++){
for(int z = 0; z <= k; z++)
{
if (s==x+y+z)
ans=ans+1
}
}
}
printf("%d",ans);
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before '}' token
12 | ans=ans+1
| ^
| ;
13 | }
| ~
|
s730430208 | p03835 | C++ |
#include <iostream>
using namespace std;
int main(){
int s,k;
cin>>k>>s;
for(int x=0;x<=k;x++) {
for(int y=0;y<=k;y++) {
int z=s-(x+y);
if((z>=0)&&(z<=k){ count ++; }}} cout<<count;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:18: error: expected ')' before '{' token
10 | if((z>=0)&&(z<=k){ count ++; }}} cout<<count;
| ~ ^
| )
a.cc:10:31: error: expected primary-expression before '}' token
10 | if((z>=0)&&(z<=k){ count ++; }}} cout<<count;
| ... |
s964842504 | p03835 | C++ | //f
#include <iostream> using namespace std; int main(){ int s,k; cin>>k>>s; for(int x=0;x<=k;x++) { for(int y=0;y<=k;y++) { int z=s-(x+y); if((z>=0)&&(z<=k){ count ++; }}}} cout<<count; return 0; } | a.cc:2:21: warning: extra tokens at end of #include directive
2 | #include <iostream> using namespace std; int main(){ int s,k; cin>>k>>s; for(int x=0;x<=k;x++) { for(int y=0;y<=k;y++) { int z=s-(x+y); if((z>=0)&&(z<=k){ count ++; }}}} cout<<count; return 0; }
| ^~~~~
/usr/bin/ld: /usr/lib... |
s013410978 | p03835 | C++ | #include <iostream>
using namespace std;
int main(){
int s,k;
cin>>k>>s;
for(int x=0;x<=k;x++)
{
for(int y=0;y<=k;y++)
{
int z=s-(x+y);
if((z>=0)&&(z<=k){
count ++;
}}}}
cout<<count;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:18: error: expected ')' before '{' token
11 | if((z>=0)&&(z<=k){
| ~ ^
| )
a.cc:13:2: error: expected primary-expression before '}' token
13 | }}}}
| ^
a.cc: At global scope:
a.cc:14:1: error: 'cout' does not name a type
... |
s814379759 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[n];
int main()
{
cin>>k>>s;
for(int i=0;i<=k;i++)
{
for(int j=0;j<=k;j++)
{
a[n+i+j]++;
}
}
int sum=0;
for(int i=0;i<=k;i++)
{
int pos=s-i;
if(pos<0)
... | a.cc:3:9: error: 'n' was not declared in this scope; did you mean 'yn'?
3 | int a[n];
| ^
| yn
a.cc: In function 'int main()':
a.cc:7:12: error: 'k' was not declared in this scope
7 | cin>>k>>s;
| ^
a.cc:7:15: error: 's' was not declared in this scope
7 |... |
s340572314 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[n];
int main()
{
int k,s;
cin>>k>>s;
for(int i=0;i<=k;i++)
{
for(int j=0;j<=k;j++)
{
a[n+i+j]++;
}
}
int sum=0;
for(int i=0;i<=k;i++)
{
int pos=s-i;
if(pos<0)
... | a.cc:3:9: error: 'n' was not declared in this scope; did you mean 'yn'?
3 | int a[n];
| ^
| yn
a.cc: In function 'int main()':
a.cc:12:14: error: 'a' was not declared in this scope
12 | a[n+i+j]++;
| ^
a.cc:12:16: error: 'n' was not declared in this s... |
s595484900 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[n];
int main()
{
int k,s;
cin>>k>>s;
for(int i=0;i<=k;i++)
{
for(int j=0;j<=k;j++)
{
a[n+i+j]++;
}
}
int sum=0;
for(int i=0;i<=k;i++)
{
int pos=s-i;
if(pos<0)
... | a.cc:3:9: error: 'n' was not declared in this scope; did you mean 'yn'?
3 | int a[n];
| ^
| yn
a.cc: In function 'int main()':
a.cc:12:14: error: 'a' was not declared in this scope
12 | a[n+i+j]++;
| ^
a.cc:12:16: error: 'n' was not declared in this s... |
s936102587 | p03835 | C++ | //
// main.cpp
// 051_B_Sum_of_Three_Integers2
//
// Created by tolemy on 2019/07/15.
// Copyright © 2019 tolemy. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, const char * argv[]) {
//入力の受け取り
int k, s = 0;
cin >> k >> s;
... | a.cc: In function 'int main(int, const char**)':
a.cc:42:16: error: 'binary_search' was not declared in this scope
42 | if(binary_search(answer.begin(), answer.end(), y + z)) count++;
| ^~~~~~~~~~~~~
|
s417375750 | p03835 | C++ | #import<iostream>
using namespace std;
int main() {
int k,s; cin >> k >> s;
int count = 0;
for(int x = 0; x <= k; x++) {
for(int y = 0; y <= k; y++) {
if (s-x-y <= k) count++
}
}
cout << count << endl;
} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc: In function 'int main()':
a.cc:10:36: error: expected ';' before '}' token
10 | if (s-x-y <= k) count++
| ^
| ... |
s087188230 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int i,j,N,K,cnt=0,t;
cin>>N>>K;
for(i=0,i<=N;i++){
for(j=0,j<=N;j++){
t=K-i-j;
if(t>=0&&t<=K)cnt++;
}
}
cout <<cnt<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before ')' token
7 | for(i=0,i<=N;i++){
| ^
| ;
a.cc:8:17: error: expected ';' before ')' token
8 | for(j=0,j<=N;j++){
| ^
| ;
|
s458618517 | p03835 | C++ | K,S=map(int,input().split())
cnt=0
for i in range(K+1):
for j in range(K+1):
if 0<=S-i-j<=K:
cnt+=1
print(cnt) | a.cc:1:1: error: 'K' does not name a type
1 | K,S=map(int,input().split())
| ^
|
s627076846 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a) (a).begin(),(a... | a.cc: In function 'int main()':
a.cc:33:15: error: 'x' was not declared in this scope
33 | REP(j,K+1-x) {
| ^
a.cc:25:37: note: in definition of macro 'FOR'
25 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
| ^
a.cc:33:5: note: in expansion of macro... |
s930800171 | p03835 | C++ | import java.util.*
fun main(args : Array<String>) {
val sc = Scanner(System.`in`)
val k = sc.nextInt()
val s = sc.nextInt()
var result = 0
for (x in 0..k) {
for (y in 0..k) {
if (x+y <= s && s <= x+y+k) result++
}
}
}
print(result)
}
| a.cc:4:29: error: stray '`' in program
4 | val sc = Scanner(System.`in`)
| ^
a.cc:4:32: error: stray '`' in program
4 | val sc = Scanner(System.`in`)
| ^
a.cc:9:15: error: too many decimal points in number
9 | for (x in 0..k)... |
s736606225 | p03835 | C | #include<stdio.h>
int main(){
int K,S,a,b,c,cnt=0;
scanf("%d %d", &K, &S);
for(a=0; a<=K; a++){
for(b=0; b<=K; b++){
c=s-a-b;
if(c<=K && c>=0)
cnt++;
}
printf("%d",cnt);
}
return 0;
} | main.c: In function 'main':
main.c:7:9: error: 's' undeclared (first use in this function)
7 | c=s-a-b;
| ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
|
s619666609 | p03835 | C | #include<stdio.h>
int main(){
int K,S,a,b,c,cnt=0;
scanf("%d %d", &K, &S);
for(a=0; a<=K; a++){
for(b=0; b<=K; b++){
c=s-a-b;
if(c<=K && c>=0)
cnt++;
}
printf("%d\n",cnt);
}
return 0;
}
| main.c: In function 'main':
main.c:7:9: error: 's' undeclared (first use in this function)
7 | c=s-a-b;
| ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
|
s224128502 | p03835 | C | #include<stdio.h>
int main(){
int s,k,a,b,c,cnt=0;
scanf("%d %d", &s, &k);
for(a=0; a<=k; a++){
for(b=0; b<=k; b++){
c=s-a-b;
if(c<=k && c>=0){
cnt+=1;
}
}
// printf("%d",cnt);
}
printf("%d",cnt);
return0;
} | main.c: In function 'main':
main.c:15:3: error: 'return0' undeclared (first use in this function)
15 | return0;
| ^~~~~~~
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
|
s120450362 | p03835 | C | #include<stdio.h>
int main(){
int s,k,a,b,c,cnt=0;
scanf("%d%d", &s, &k);
for(a=0; a<=k; a++){
for(b=0; b<=k; b++){
c=s-a-b;
if(c<=k && c>=0){
cnt+=1
}
}
}
}
}
printf("%d\n",cnt);
}
| main.c: In function 'main':
main.c:9:15: error: expected ';' before '}' token
9 | cnt+=1
| ^
| ;
10 | }
| ~
main.c: At top level:
main.c:14:3: error: expected identifier or '(' before '}' token
14 | }
| ^
main.c:15:10: error: ... |
s835795889 | p03835 | C | #include<stdio.h>
int main(){
int s,k,a,b,c,cnt;
scanf("%d%d", &s, &k);
cnt=0;
for(a=0; a<=k; a++){
for(b=0; b<=k; b++){
c=s-a-b;
if(c<=k && c>=0){
cnt+=1
}
}
}
}
}
printf("%d\n",cnt);
}
| main.c: In function 'main':
main.c:10:15: error: expected ';' before '}' token
10 | cnt+=1
| ^
| ;
11 | }
| ~
main.c: At top level:
main.c:15:3: error: expected identifier or '(' before '}' token
15 | }
| ^
main.c:16:10: error:... |
s629394226 | p03835 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(Sytem.in);
int k = sc.nextInt();
int s = sc.nextInt();
int ans = 0;
for (int i = 0; i <= k; i++) {
for (int j = 0; j <= k; j++) {
int tmp = s - i - j;
if (0 <=tmp && tmp... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(Sytem.in);
^
symbol: variable Sytem
location: class Main
1 error
|
s196050659 | p03835 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int K,S,i,ans=0;
cin >> K >> S;
for(i=0; i<K+1; i++){
ans += S-i+1
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before '}' token
9 | ans += S-i+1
| ^
| ;
10 | }
| ~
|
s854405423 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d;
c=0;
d=0;
cin>>a>>b;
for(int i=0;i<=a;i++){
for(int j=0;j<=a;j++){
for(int k=0;k<=a;k++){
if(i+j+k==b)
c++;
if(i+j>b){
break;
}
if(i+j>b){
d=j;
break;
}
}
if(i+d>b)
break;
}
cout<<... | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s632297460 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
c=0;
cin>>a>>b;
for(int i=0;i<=a;i++){
for(int j=0;j<=a;j++){
for(int k=0;k<=a;k++){
if(i+j+k==b)
c++;
if(i+j>b){
break;
}
}
if(i+j>b)
a=j;
break;
}
if(i+j>a)
break;
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:21:10: error: 'j' was not declared in this scope
21 | if(i+j>a)
| ^
|
s469531846 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
c=0;
cin>>a>>b;
for(int i=0;i<=a;i++){
for(int j=0;j<=a;j++){
for(int k=0;k<=a;k++){
if(i+j+k==b)
c++;
if(i+j>b)
break;
}
if(i+j>b)
break;
}
if(i+j>b)
break;
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:19:10: error: 'j' was not declared in this scope
19 | if(i+j>b)
| ^
|
s314191870 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
c=0;
cin>>a>>b;
for(int i=0;i<a;i++){
for(int j=0;j<a;j++){
for(int k=0;k<a;k++){
if(i+j+k==b)
c++;
if(i+j>b)
break;
}
if(i+j>b)
break;
}
if(i+j>b)
break;
}
cout<<c<<endl;
} | a.cc: In function 'int main()':
a.cc:19:10: error: 'j' was not declared in this scope
19 | if(i+j>b)
| ^
|
s744532408 | p03835 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int main(int argc, const char * argv[]) {
int K, S;
cin >> K >> S;
int ans = 0;
for(int i = 0; i <= S; i++){
for(int j = 0; j <= S - i; j++){
if(i+j + k <= S){
... | a.cc: In function 'int main(int, const char**)':
a.cc:14:20: error: 'k' was not declared in this scope
14 | if(i+j + k <= S){
| ^
|
s038358935 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, S;
cin >> K >> S;
int ans = 0;
for (int i = 0; i <= K; i++) {
for (int j = 0; j <= K; j++) {
if (S - i - j <=K && S - i - j >= 0) {
ans++;
}
}
}
}
cout << ans << endl;
} | a.cc:16:3: error: 'cout' does not name a type
16 | cout << ans << endl;
| ^~~~
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s551970956 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, S;
cin >> K >> S;
int ans = 0;
for (int i = 0; i <= K; i++) {
for (int j = 0; j <= K; j++) {
for (int k = 0; k<= K; k++) {
if (S == i + j + k) {
ans+++;
}
}
}
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression before ';' token
12 | ans+++;
| ^
|
s938965798 | p03835 | Java | import java.util.Scanner;
public class Aim {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int k = scan.nextInt();
int s = scan.nextInt();
int x = 0;
int y = 0;
int z = 0;
int countS = 0;
int countK = 0;
countS = (s + 2) * (s + 1) / 2; /... | Main.java:3: error: class Aim is public, should be declared in a file named Aim.java
public class Aim {
^
1 error
|
s034339011 | p03835 | C++ | #include<iostream>
#include <vector>
#include "cxx-prettyprint/prettyprint.hpp"
#define MSG(x) std::cout << (x) << std::endl;
using namespace std;
int main() {
int K, S;
cin >> K >> S;
std::vector<std::vector<int>> list;
for (int x=0; x<=K && x<=S; x++) {
int YplusZ = S - x;
for (int ... | a.cc:3:10: fatal error: cxx-prettyprint/prettyprint.hpp: No such file or directory
3 | #include "cxx-prettyprint/prettyprint.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s544323260 | p03835 | C++ | #include <bits/stdc++.h>
#define IO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout)
using namespace std;
int K, S, T;
int main(void){
//IO("test.in", "test.out");
scanf("%d%d", &K, &S);
for(int i = 0; i <= K; i++)
if(S - i <= K * 2) 2 * (1 << (K * 2 - S - i))
printf("%d\n", T);
} | a.cc: In function 'int main()':
a.cc:11:62: error: expected ';' before 'printf'
11 | if(S - i <= K * 2) 2 * (1 << (K * 2 - S - i))
| ^
| ;
12 | printf("%d\n... |
s451191051 | p03835 | C++ | #include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <cmath>
#define mod 1000000007
using namespace std;
int main(void){
int K, S;
cin >> K >> S;
for(int i=0; i<=K; i++){
for(int j=0; j<=K; j++){
if(i+j <= S && i+j >= 2*K)
count++;
}
}
cout << count;
return... | a.cc: In function 'int main()':
a.cc:20:38: error: no post-increment operator for type
20 | count++;
| ^~
a.cc:25:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloa... |
s670479359 | p03835 | C++ | #include<stdio.h>
int main(void)
{
int k,s,x,y,z,a;
scanf("%d",&k);
scanf("%d",&s);
a=0;
for(x=0;x<=k;++x) {
for(y=0;y<=k;++y) {
if(0<=z a z<=k) {
a=a+1;
}
}
}
printf("%d\n",a);
return 0;
} | a.cc: In function 'int main()':
a.cc:11:32: error: expected ')' before 'a'
11 | if(0<=z a z<=k) {
| ~ ^~
| )
|
s656636646 | p03835 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main() {
int K,S;
cin >> K>>S;
int count =0;
for (int i=0;i<=K;i++) {
for (int j=0;j<=K;j++) {
for (int k=0;k<=K;k++) {
if (i+j+k==S) {
count++;
}
}
}
}
cout << count << endl;
... | a.cc: In function 'int main()':
a.cc:19:27: error: expected '}' at end of input
19 | cout << count << endl;
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s663040356 | p03835 | C++ | #include <iostream>
using namespace std;
int main() {
int K, S;
cin >> K >> S;
count = 0;
for(int x=0; x<=K; x++){
for(int y=0; y<=K; y++){
for(int z=0; z<=K; z++){
if(x + y + z == S)
count++;
}
}
}
cout << count << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'count' was not declared in this scope
7 | count = 0;
| ^~~~~
|
s427597378 | p03835 | C++ | #include<iostream>
using namespace std;
int main() {
int K,S;
cin >> K >> S;
int count = 0;
for(int i = 1,i <= K;i++) {
for(int j = 1;j <= K;j++) {
for(int k = 1;k <= K;k++) {
if(i + j + k == S) {
count++;
}
}
}
}
cout << count < endl;
} | a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before '<=' token
8 | for(int i = 1,i <= K;i++) {
| ^~~
| ;
a.cc:8:19: error: expected primary-expression before '<=' token
8 | for(int i = 1,i <= K;i++) {
| ^~
a.cc:17:17: er... |
s009699520 | p03835 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
typede... | a.cc: In function 'int main()':
a.cc:34:29: error: 'a' was not declared in this scope
34 | if (a+k < s && s-(a+b) <= k){
| ^
a.cc:34:45: error: 'b' was not declared in this scope
34 | if (a+k < s && s-(a+b) <= k){
| ... |
s580524196 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int K,S;
cin >> K >> S;
int c=0;
for (int i=0;i=<min(K,S);i++){
c+=S-i+1;
}
cout << c << endl;
}
| a.cc: In function 'int main()':
a.cc:7:18: error: expected primary-expression before '<' token
7 | for (int i=0;i=<min(K,S);i++){
| ^
|
s457158693 | p03835 | C++ | #include <iostream>
using namespace std;
int main() {
int K, S;
cin >> K >> S;
int cnta = 0;
//まずはj<l<i
for (int i = 0; i < K + 1; i++)
{
for (int l = 0; l < i; i++)
{
for (int j = 0; j < l; i++)
{
if (i + l + j == S)
{
cnta += 1;
}
}
}
cnta *= 6;
//3こ全部違う
int cntb;
for (i... | a.cc: In function 'int main()':
a.cc:45:10: error: expected '}' at end of input
45 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s335975971 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int k, s, ans;
int main ()
{
cin>>k>>s;
for(int i=1;i<=k;i++)
{
for(int j=1;j<=k;j++)
int ij=s-i-j;
if(ij<=k && ij >=0)ans++;
}
cout<<ans<<"\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:16: error: 'ij' was not declared in this scope; did you mean 'i'?
11 | if(ij<=k && ij >=0)ans++;
| ^~
| i
|
s153251807 | p03835 | C++ | #include <bits/stdc++.h>
using namespace std;
int k, s;
int main ()
{
cin>>k>>s;
for(int i=1;i<=k;i++)
{
for(int j=1;j<=k;j++)
int ij=s-i-j;
if(ij<=k && ij >=0)ans++;
}
cout<<ans<<"\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:16: error: 'ij' was not declared in this scope; did you mean 'i'?
11 | if(ij<=k && ij >=0)ans++;
| ^~
| i
a.cc:11:32: error: 'ans' was not declared in this scope; did you mean 'abs'?
11 | if(ij<=k && ij >=0)a... |
s171068419 | p03835 | C++ | //#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
//入力
long K,S,x=0,y=0,z=0,ans=0;
cin >> K >> S;
//処理
for (int i = 0; i < K; i++) {
for (int j = 0; j < K; j++) {
if (S-(i + j) >= 0 && S-(i+l) <= K) {
ans++;
}
}
}
//出力
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:12:60: error: 'l' was not declared in this scope
12 | if (S-(i + j) >= 0 && S-(i+l) <= K) {
| ^
|
s320043094 | p03835 | C++ | //#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main() {
//入力
long K,S,x=0,y=0,z=0,ans=0;
cin >> K >> S;
//処理
for (int i = 0; i < K; i++) {
for (int j = 0; j < K; j++) {
if (S-(i + j) >= 0 && S-(i+l) <= K) {
ans++;
}
}
}
//出力
cout << ans << endl; | a.cc: In function 'int main()':
a.cc:12:60: error: 'l' was not declared in this scope
12 | if (S-(i + j) >= 0 && S-(i+l) <= K) {
| ^
a.cc:18:29: error: expected '}' at end of input
18 | cout << ans << endl;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.