submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s532816503 | p03963 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#define MOD 1000000007;
using namespace std;
int main()
{
int N, K;
cin >> N >> K;
cout << K * pow(K - 1, N - 1);
return 0;
}
int pow(int A, int B)
{
if (B % 2 == 1)
{
return pow(A*A, B / 2)* A;
}
else if (B == 0)
{
return 1;
}
else if (B % ... | a.cc: In function 'int main()':
a.cc:12:21: error: 'pow' was not declared in this scope
12 | cout << K * pow(K - 1, N - 1);
| ^~~
a.cc: In function 'int pow(int, int)':
a.cc:31:1: warning: control reaches end of non-void function [-Wreturn-type]
31 | }
| ^
|
s782896368 | p03963 | C++ | #include <algorithm>
#include <iostream>
##include <math.h>
using namespace std;
int main(){
long long int x,y;
cin>>x>>y;
long long int ans=1;
ans=ans*pow(y-1,x-1)*y;
cout<<ans<<endl;
} | a.cc:3:1: error: stray '##' in program
3 | ##include <math.h>
| ^~
a.cc:3:3: error: 'include' does not name a type
3 | ##include <math.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>x>>y;
| ^~~
|... |
s979067627 | p03963 | Java | import java.util.Scanner;
class Main {
int n,k,s;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
k = sc.nextInt();
s = k * pow((k-1),(p-1));
System.out.println(s);
} | Main.java:5: error: <identifier> expected
n = sc.nextInt();
^
Main.java:6: error: <identifier> expected
k = sc.nextInt();
^
Main.java:7: error: <identifier> expected
s = k * pow((k-1),(p-1));
^
Main.java:8: error: <identifier> expected
System.out.println(s);
^
Main.java:8: error: <identifie... |
s982143053 | p03963 | C++ | #include <iostream>
int main()
{
int N, K;
scanf("%d %d", &N, &K);
long long result = 0;
result = pow(K - 1, N - 1)*K;
printf("%d", result);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: 'pow' was not declared in this scope
8 | result = pow(K - 1, N - 1)*K;
| ^~~
|
s727092197 | p03963 | C++ | #include"bits/stdc++.h"
using namespace std;
int main(){
long long ans,n,k;
cin>>n>>k;
ans=k;
for(int i=1;i!=n;++i)
ans*=k-1
cout<<ans;
}
| a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before 'cout'
8 | ans*=k-1
| ^
| ;
9 | cout<<ans;
| ~~~~
|
s916491640 | p03963 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int N, K;
cin >> N >> K;
ll p=K ;
for (int i = 0;i < N-1;i++) {
p = p*(K - 1);
}
cout << p << endl;
return 0;
| a.cc: In function 'int main()':
a.cc:13:26: error: expected '}' at end of input
13 | return 0;
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s209598796 | p03963 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make... | a.cc: In function 'int main()':
a.cc:21:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
21 | ans = k;
| ^~~
| abs
|
s037407941 | p03963 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int sum =Math.pow((K-1),(N-1))*K;
System.out.println(sum);
}
} | Main.java:7: error: incompatible types: possible lossy conversion from double to int
int sum =Math.pow((K-1),(N-1))*K;
^
1 error
|
s423625387 | p03963 | Java | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
double n = scanner.nextDouble();
double k = scanner.nextDouble();
double cnt = k * Math.pow(k - 1, n-1);
System.out.println((int)cnt);
}
} | Main.java:6: error: cannot find symbol
double n = scanner.nextDouble();
^
symbol: variable scanner
location: class Main
Main.java:7: error: cannot find symbol
double k = scanner.nextDouble();
^
symbol: variable scanner
location: class Main
2 errors
|
s988518340 | p03963 | Java | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
double n = scanner.nextDouble();
double k = scanner.nextDouble();
double cnt = k * Math.pow(k - 1, n-1);
System.out.println((int)cnt);
}
} | Main.java:6: error: cannot find symbol
double n = scanner.nextDouble();
^
symbol: variable scanner
location: class Main
Main.java:7: error: cannot find symbol
double k = scanner.nextDouble();
^
symbol: variable scanner
location: class Main
2 errors
|
s288762723 | p03963 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String c = sc.next();
int N = sc.nextInt();
int K = sc.nextInt();
int cnt = K * (Math.pow(K-1,N-1));
System.out.println(cnt);
}
} | Main.java:9: error: incompatible types: possible lossy conversion from double to int
int cnt = K * (Math.pow(K-1,N-1));
^
1 error
|
s230096297 | p03963 | C | #include <stdio.h>
#include <stdlib.h>
int main(void) {
int n, k;
scanf_s("%d %d", &n, &k);
int ans = k;
for (int i = 1; i < n; i++) {
ans *= (k - 1);
}
printf("%d\n", ans);
return 0;
}
| main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scanf_s("%d %d", &n, &k);
| ^~~~~~~
| scanf
|
s697722992 | p03963 | C | #include <stdio.h>
int main(void) {
int n, k;
scanf_s("%d %d", &n, &k);
int ans = k;
for (int i = 1; i < n; i++) {
ans *= (k - 1);
}
printf("%d\n", ans);
return 0;
}
| main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d", &n, &k);
| ^~~~~~~
| scanf
|
s778533569 | p03963 | C | #include <stdio.h>
int Power(int i,int j){
int k,l,m;
m = 1;
k = j-1;
for(l=0;l++;l<<k;){
m = m*i;
}
return m;
}
int main(){
int N,K;
scanf("%d",&N,&K);
printf("%d",Power(N,K));
return 0;
} | main.c: In function 'Power':
main.c:6:18: error: expected ')' before ';' token
6 | for(l=0;l++;l<<k;){
| ~ ^
| )
|
s509394510 | p03963 | C++ | #include <iostream>
#include <cmath>
using std;
int main() {
int a, b;
cin >> a >> b;
cout << b * pow(b - 1, a - 1) << endl;
return 0;
} | a.cc:3:7: error: expected nested-name-specifier before 'std'
3 | using std;
| ^~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream... |
s233411339 | p03963 | C++ | #include <iostream>
#include <math>
using std;
int main() {
int a, b;
cin >> a >> b;
cout << b * pow(b - 1, a - 1) << endl;
return 0;
} | a.cc:2:10: fatal error: math: No such file or directory
2 | #include <math>
| ^~~~~~
compilation terminated.
|
s028998718 | p03963 | C++ | #include<iostream>
using namespace std;
int main() {
int size, kind;
cin >> size >> kind;
if (size == 1) {
cout << kind << endl;
}
else {
cout << kind*(int)pow(kind - 1, size - 1) << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:35: error: 'pow' was not declared in this scope
10 | cout << kind*(int)pow(kind - 1, size - 1) << endl;
| ^~~
|
s935723937 | p03963 | C++ | #include <iostream>
using namespace std;
int main()
{
int N,K,x;
cin << N << K;
for(int i=0;i<(N-1);i++)
{
x*=(K-1);
}
x*=(K);
cout >> x >> endl;
} | a.cc: In function 'int main()':
a.cc:6:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin << N << K;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>... |
s784967661 | p03963 | C++ | #include<iostream>
using namespace std;
int main(){
double n,k,sum;
cin>>n>>k;
sum=k*pow(k-1,n-1);
cout<<sum<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:15: error: 'pow' was not declared in this scope
6 | sum=k*pow(k-1,n-1);
| ^~~
|
s041171921 | p03963 | C++ | #include <iostream>
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<c... | a.cc: In function 'int main()':
a.cc:37:29: error: expected primary-expression before ')' token
37 | for(int i=1;i<N;i++))
| ^
a.cc: At global scope:
a.cc:47:1: error: 'Submission' does not name a type
47 | Submission
| ^~~~~~~~~~
|
s053554388 | p03963 | C++ | #include <iostream>
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<c... | a.cc: In function 'int main()':
a.cc:37:29: error: expected primary-expression before ')' token
37 | for(int i=1;i<N;i++)) {
| ^
a.cc: At global scope:
a.cc:47:1: error: 'Submission' does not name a type
47 | Submission
| ^~~~~~~~~~
|
s356694040 | p03963 | C++ | #include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<init... | a.cc: In function 'int main()':
a.cc:32:29: error: expected primary-expression before ')' token
32 | for(int i=1;i<N;i++)) {
| ^
|
s646308505 | p03963 | C++ | #include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<init... | a.cc: In function 'int main()':
a.cc:32:31: error: expected primary-expression before ')' token
32 | for(int i=1;i<N-1;i++)) {
| ^
|
s261675249 | p03963 | C++ | #include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<init... | a.cc: In function 'int main()':
a.cc:32:31: error: expected primary-expression before ')' token
32 | for(int i=1;i<N-1;i++)) {
| ^
|
s616821765 | p03963 | C++ | #include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
#include<typeinfo>
#include<chrono>
#include<init... | a.cc: In function 'int main()':
a.cc:30:12: error: redeclaration of 'int A'
30 | int A=K;
| ^
a.cc:26:17: note: 'int A' previously declared here
26 | int N,K,A;
| ^
a.cc:32:31: error: expected primary-expression before ')' token
32 | for(int i=1;i++... |
s131875455 | p03963 | C++ | #include <iostream>
using namespace std;
int main() {
int N,K,A;
cin >> N >> K ;
A=K;
for(i=1;i++;i<N-1)) {
A=A*(K-1);
}
cout<<A;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:13: error: 'i' was not declared in this scope
11 | for(i=1;i++;i<N-1)) {
| ^
a.cc:11:27: error: expected primary-expression before ')' token
11 | for(i=1;i++;i<N-1)) {
| ^
|
s752818001 | p03963 | C++ | #include <iostream>
using namespace std;
int main() {
int N,K,A;
cin >> N >> K ;
A=K
for(i=1;i++;i<N-1)) {
A=A*(K-1)
}
cout<<A;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before 'for'
9 | A=K
| ^
| ;
10 |
11 | for(i=1;i++;i<N-1)) {
| ~~~
a.cc:11:17: error: 'i' was not declared in this scope
11 | for(i=1;i++;i<N-1)) {
| ^
|
s491520748 | p03963 | C++ | #include <iostream>
using namespace std;
int main() {
int N,K,A;
cin >> N >> K ;
for(i=1;i++;i<N-1)) {
}
else if (a == b) {
cout << 2 << endl;
}
else if (b == c) {
cout << 2 << endl;
}
else if (c == a) {
cout << 2 << endl;
}
else {
cout << 3 << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | for(i=1;i++;i<N-1)) {
| ^
a.cc:9:27: error: expected primary-expression before ')' token
9 | for(i=1;i++;i<N-1)) {
| ^
a.cc:12:9: error: 'else' without a pre... |
s727401347 | p03963 | Java | import java.util.Scanner;
public class B {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long tmp = (long) Math.pow((b-1),(a-1));
if (tmp == 0) System.out.println(b);
else System.out.prin... | Main.java:3: error: class B is public, should be declared in a file named B.java
public class B {
^
1 error
|
s551866312 | p03963 | C | #include<stdio.h>
int main(){
int n,k;
scanf("%d %d",&n,&k);
int answer=k;
for(int i=0;i<k;i++){
answer*=(k-1);
}
printf("%d",&answer)
return 0;
} | main.c: In function 'main':
main.c:9:21: error: expected ';' before 'return'
9 | printf("%d",&answer)
| ^
| ;
10 | return 0;
| ~~~~~~
|
s110235551 | p03963 | C | #include<stdio.h>
int main(){
int n,k;
scanf("%d %d",&n,&k);
int answer=k;
for(i=0;i<k,i++){
answer*=(k-1);
}
return 0;
} | main.c: In function 'main':
main.c:6:5: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<k,i++){
| ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:16: error: expected ';' before ')' token
6 | for(i=0;i<k,i++){
| ... |
s372464712 | p03963 | C | #include<stdio.h>
#include<math.h>
int main(){
double N,K;
scanf("%d %d",&N,&K);
if(N%2==0){
int a=N/2;
double c=pow(K,a)*pow(K-1,a);
printf("%f",c);
}
else{
int a=N/2+1;
double c=pow(K,a)*pow(K-1,a-1)
printf("%f",c);
}
return 0;
} | main.c: In function 'main':
main.c:7:5: error: invalid operands to binary % (have 'double' and 'int')
7 | if(N%2==0){
| ^
main.c:15:1: error: expected ',' or ';' before 'printf'
15 | printf("%f",c);
| ^~~~~~
|
s214981811 | p03963 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
int n, k;
int dp[1010][1010];
int poyo(int i=0, int uyu=1001)
{
int& ret = dp[i][uyu];
if (ret != -1) return ret;
if (i == n) return 1;
ret = 0;
for (int j = 0; j < k; j++){
if (j == uyu) continue;
ret += poyo(i + 1, j);
}
r... | cc1plus: error: '::main' must return 'int'
|
s782514763 | p03963 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
int n, k;
int dp[1010][1010];
int poyo(int i=0, int uyu=1001)
{
int& ret = dp[i][uyu];
if (ret != -1) return ret;
if (i == n) return 1;
ret = 0;
for (int j = 0; j < k; j++){
if (j == uyu) continue;
ret += poyo(i + 1, j);
}
r... | cc1plus: error: '::main' must return 'int'
|
s713936647 | p03963 | C++ | #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <b... | a.cc: In function 'void mainmain()':
a.cc:100:18: error: 'K' was not declared in this scope
100 | ll ans = K;
| ^
|
s687553562 | p03963 | C | #include<stdio.h>
#include<math.h>
int main(void){
int N,K;
scanf("%d%d",&N,&K);
printf("%d",K*(int)pow(K-1,N-1))
return 0;
}
| main.c: In function 'main':
main.c:10:41: error: expected ';' before 'return'
10 | printf("%d",K*(int)pow(K-1,N-1))
| ^
| ;
11 |
12 | return 0;
| ~~~~~~
|
s402017310 | p03963 | C | #include<stdio.h>
#includ<math.h>
int main(void){
int N,K;
scanf("%d%d",&N,&K);
printf("%d",K*pow(K-1,N-1))
return 0;
}
| main.c:2:2: error: invalid preprocessing directive #includ; did you mean #include?
2 | #includ<math.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:10:23: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
10 | printf("%d",K*pow(K-1,N-1))
| ... |
s441668591 | p03963 | C | #include <stdio.h>
int main(){
int n;
unsigned long long int k;
scanf("%d %llud", &n, &k);
unsigned long long int answer = k;
for(i = 1; i < n; i++){
answer = answer * (k - 1);
}
printf("%llud", answer);
} | main.c: In function 'main':
main.c:8:9: error: 'i' undeclared (first use in this function)
8 | for(i = 1; i < n; i++){
| ^
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
|
s385417573 | p03963 | Java | import java.util.Scanner;
public class Main{
int ruijo(int n, int r){
if(r == 0) return 1;
else return n*ruijo(n,r-1);
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt(), K = sc.nextInt();
System.out.println(K*ruijo(N-1,K-1));
}
} | Main.java:13: error: non-static method ruijo(int,int) cannot be referenced from a static context
System.out.println(K*ruijo(N-1,K-1));
^
1 error
|
s786674598 | p03963 | C | #include <stdio.h>
int main(void) {
int n,k,i,j,pos;
printf("please give num of balls and num of paints");
scanf("%d %d",&n,%k);
i=0;
j=0;
for(i=0;i<n;i++)
{
for(j=0;j<k;j++)
{
if(i!=j)
{
pos++;
}
}
}
return 0;
}
| main.c: In function 'main':
main.c:6:26: error: expected expression before '%' token
6 | scanf("%d %d",&n,%k);
| ^
|
s507334443 | p03963 | Java |
public class Main {
public static void main(String[] args) {
int N,K;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
K = sc.nextInt();
sc.close();
int pattern = K;
for(int i=0;i<N-1;i++){
pattern *= (K-1);
}
System.out.println(pattern);
}
}
| Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s680609097 | p03964 | C++ | #include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string... | a.cc:2:10: fatal error: boost/optional.hpp: No such file or directory
2 | #include <boost/optional.hpp>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s666157188 | p03964 | C++ | // C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free So... | a.cc: In function 'int main()':
a.cc:136:9: error: expected initializer before 'true_number'
136 | true_number=max(a[i][0]/count_t+1,a[i][1]/count_a+1)
| ^~~~~~~~~~~
a.cc:138:25: error: 'true_number' was not declared in this scope
138 | count_a=a[i][1]*true_number;
| ... |
s731252303 | p03964 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main () {
int N;
cin >> N;
int T[N];
int N[N];
for (int i = 0; i < N; i ++){
cin >> T[i] >> N[i];
}
for (int i = 1; i < N; i ++){
while (T[i - 1] > T[i] || N[i - 1] > N[i]){
int countT = T[i - 1] / T[i];
int countN = N[i - 1]... | a.cc: In function 'int main()':
a.cc:9:7: error: conflicting declaration 'int N [N]'
9 | int N[N];
| ^
a.cc:6:7: note: previous declaration as 'int N'
6 | int N;
| ^
a.cc:11:21: error: invalid types 'int[int]' for array subscript
11 | cin >> T[i] >> N[i];
| ... |
s797046988 | p03964 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main () {
int N;
cin >> N;
int T[N], N[N];
for (int i = 0; i < N; i ++){
cin >> T[i] >> N[i];
}
for (int i = 1; i < N; i ++){
while (arrT[i - 1] > arrT[i] || arrN[i - 1] > arrN[i]){
int countT = arrT[i - 1] / arrT[i];
int count... | a.cc: In function 'int main()':
a.cc:8:13: error: conflicting declaration 'int N [N]'
8 | int T[N], N[N];
| ^
a.cc:6:7: note: previous declaration as 'int N'
6 | int N;
| ^
a.cc:10:21: error: invalid types 'int[int]' for array subscript
10 | cin >> T[i] >> N[i];
| ... |
s429385952 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> T(n), A(n);
for (int i = 0; i < n; i++) {
cin >> T.at(i) >> A.at(i);
}
int64_t t = 1;
int64_t a = 1;
int_64 s, x, y;
for (int i = 0; i < n; i++) {
x = (t+(T.at(i)-1)) / T.at(i);
y = (a+(A.at(i)-... | a.cc: In function 'int main()':
a.cc:15:3: error: 'int_64' was not declared in this scope; did you mean 'rintf64'?
15 | int_64 s, x, y;
| ^~~~~~
| rintf64
a.cc:17:5: error: 'x' was not declared in this scope
17 | x = (t+(T.at(i)-1)) / T.at(i);
| ^
a.cc:18:5: error: 'y' was not decl... |
s924990061 | p03964 | C++ | #include<cmath>
using namespace std;
int main(){
int N;
cin >> N;
int T[N];
int A[N];
for(int i=0; i<N; i++){
cin >> T[i] >> A[i];
}
long long currentT = T[0], currentA = A[0];
for(int i=1; i<N; i++){
long long nextT=T[i], nextA=A[i];
if(nextT < currentT || next... | a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin >> N;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<cmath>
+++ |+#include <iostream>
2 | using namespace s... |
s344457452 | p03964 | C++ |
#include <bits/stdc++.h>
#include <string.h>
#include <vector>
//s#define rep(i, n) for (int i = 0; i < (n); i++)
#define MAX 10000
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define rep(i,a,n) for(int i=a; i<n; i++)
#define r0 return 0... | a.cc: In function 'int main()':
a.cc:37:20: error: 'minn' was not declared in this scope
37 | long long n1 = minn(ta.first,T);
| ^~~~
a.cc:41:18: error: 't' was not declared in this scope
41 | ta.first = n*t;
| ^
|
s239809796 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> T(N);
vector<int> A(N);
for (int i = 0; i < N; i++) {
cin >> T[i] >> A[i];
}
int S = T[0] + A[0];
for(int i = 1; i < N; i++){
if(T[i] < T[i-1] || A[i] < A[i-1]){
int p = max((double)T[i-... | a.cc: In function 'int main()':
a.cc:26:21: error: expected '}' at end of input
26 | cout << S << endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s590502956 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
int t[n], a[n];
for (int i = 0; i < n; i++) {
cin >> t[i];
cin >> a[i];
}
long long A = 1, B = 1;
long long total = 0;
for (int i = 0; i < n; i++) {
long long x = t[i], y = a[i];
long long n... | a.cc: In function 'int main()':
a.cc:19:26: error: no matching function for call to 'max(long long int)'
19 | long long n = max((A - 1) / x + 1), (B - 1) / y + 1);
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14... |
s848578776 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
int t[n], a[n];
for (int i = 0; i < n; i++) {
cin >> t[i];
cin >> a[i];
}
int A = 1, B = 1;
int total = 0;
for (int i = 0; i < votes.size(); i++) {
int x = t[i], y = a[i];
int n = max(cei... | a.cc: In function 'int main()':
a.cc:17:23: error: 'votes' was not declared in this scope
17 | for (int i = 0; i < votes.size(); i++) {
| ^~~~~
|
s471668730 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
int t[n], a[n];
for (int i = 0; i < n; i++) {
cin >> t[i];
cin >> a[i];
}
int A = 1, B = 1;
int total = 0;
for (int i = 0; i < votes.size(); i++) {
int x = t[i], y = a[i];
int n = max(cei... | a.cc: In function 'int main()':
a.cc:17:23: error: 'votes' was not declared in this scope
17 | for (int i = 0; i < votes.size(); i++) {
| ^~~~~
a.cc:23:15: error: 'b' was not declared in this scope
23 | total = a + b;
| ^
|
s284386697 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
int t, u;
vector<pair<int, int>> votes;
for (int i = 0; i < n; i++) {
cin >> t;
cin >> u
votes.push_back(make_pair(t, u));
}
int a = 1, b = 1;
int total = 0;
for (int i = 0; i < vote... | a.cc: In function 'int main()':
a.cc:14:13: error: expected ';' before 'votes'
14 | cin >> u
| ^
| ;
15 | votes.push_back(make_pair(t, u));
| ~~~~~
|
s454612940 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
int t;
vector<pair<int, int>> votes;
for (int i = 0; i < n; i++) {
cin >> t;
votes.push_back(t);
}
int a = 1, b = 1;
int total = 0;
for (int i = 0; i < votes.size() - 1; i++) {
int x... | a.cc: In function 'int main()':
a.cc:14:20: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(int&)'
14 | votes.push_back(t);
| ~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h... |
s287609216 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
#define f(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) f(i,0,n)
#define fd(i,a,b) for(i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define vi vector< int >
#define vl vector< ll >
#define ss second
#define ff first
#define ll long long
#define ull unsigned long long
#... | a.cc: In function 'int main()':
a.cc:89:16: error: no matching function for call to 'max(long long int)'
89 | N = max((t1+a[i]-1)/a[i]),(t2+t[i]-1/t[i]));
| ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/... |
s223329851 | p03964 | C++ | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <bitset>
#include <set>
using namespace std;
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;... | a.cc: In function 'int main()':
a.cc:50:33: error: 'b' was not declared in this scope
50 | ll left = 0, right = max(a, b);
| ^
|
s524769711 | p03964 | C++ | #include <iostream>
using namespace std;
typedef unsigned int u_long;
void fix(u_long & LC, u_long & LA, u_long RT, u_long RA);
int main () {
u_long N, T, A, CT, CA;
cin >> N;
cin >> CT >> CA;
while (--N > 0) {
cin >> T >> A;
fix(CT, CA, T, A);
}
cout << CT + CA << endl;
... | a.cc:5:22: error: conflicting declaration 'typedef unsigned int u_long'
5 | typedef unsigned int u_long;
| ^~~~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
... |
s016442674 | p03964 | C++ | #include <iostream>
using namespace std;
typedef unsigned int ulong;
void fix(ulong & LC, ulong & LA, ulong RT, ulong RA);
int main () {
ulong N, T, A, CT, CA;
cin >> N;
cin >> CT >> CA;
while (--N > 0) {
cin >> T >> A;
fix(CT, CA, T, A);
}
cout << CT + CA << endl;
r... | a.cc:5:22: error: conflicting declaration 'typedef unsigned int ulong'
5 | typedef unsigned int ulong;
| ^~~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
... |
s466069284 | p03964 | C++ | 101
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 101
| ^~~
|
s291048469 | p03964 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class atcoder_46_C {
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
pub... | Main.java:6: error: class atcoder_46_C is public, should be declared in a file named atcoder_46_C.java
public class atcoder_46_C {
^
1 error
|
s054402471 | p03964 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class atcoder_46_C {
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
pub... | Main.java:6: error: class atcoder_46_C is public, should be declared in a file named atcoder_46_C.java
public class atcoder_46_C {
^
1 error
|
s470009710 | p03964 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] ta = new int[n][2];
int t = 1;
int a = 1;
for (int[] x : ta) {
int power = max(x[0]/t, x[1]/a);
t = x[0]*power;
a = x[1]*power... | Main.java:13: error: cannot find symbol
int power = max(x[0]/t, x[1]/a);
^
symbol: method max(int,int)
location: class Main
1 error
|
s108632444 | p03964 | Java | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] ta = new int[n][2];
int t = 0;
int a = 0;
for (int[] x : ta) {
while(x[0] >= t && x[1] >= a){
x[0] *= 2;
x[1] *= 2;
}
... | Main.java:8: error: incompatible types: int[][] cannot be converted to int[]
int[] ta = new int[n][2];
^
Main.java:12: error: incompatible types: int cannot be converted to int[]
for (int[] x : ta) {
^
2 errors
|
s406181482 | p03964 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
using namespace std;
typedef long long llong;
int main(){
int n;
cin >> n;
llong ax, ay;
int x, y;
cin >> x >> y;
ax = x;
ay = y;
for (int i = 0; i < n - 1; i++){
sc... | a.cc: In function 'int main()':
a.cc:34:14: error: expected '}' at end of input
34 | return 0;
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s957278050 | p03964 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
using namespace std;
typedef long long llong;
int main(){
int n;
cin >> n;
llong ax, ay;
int x, y;
cin >> x >> y;
ax = x;
ay = y;
for (int i = 0; i < n - 1; i++){
sc... | a.cc: In function 'int main()':
a.cc:21:23: error: invalid operands of types 'const char [6]' and 'int' to binary 'operator&'
21 | scanf("%d %d" &x, &y);
| ~~~~~~~ ^~
| | |
| | int
| const char [6]
|
s426417972 | p03964 | Java | import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args){
FastScanner fsc=new FastScanner();
int n=fsc.nextInt();
long[][] ta=new long[n][2];
long t=0, a=0;
for(int i=0;i<n;i++){
long ti=fsc.nextLong();
long ai=fsc.next... | Main.java:19: error: variable i is already defined in method main(String[])
for(int i=1;;i++){
^
1 error
|
s774196127 | p03964 | Java | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
long T[] = new int[N];
long A[] = new int[N];
long xt = 1;
long xa = 1;
for(int i = 0; i < N; i++) {
T[i] = Integer.parseInt(sc.next());
A[i]... | Main.java:6: error: incompatible types: int[] cannot be converted to long[]
long T[] = new int[N];
^
Main.java:7: error: incompatible types: int[] cannot be converted to long[]
long A[] = new int[N];
^
2 errors
|
s880214040 | p03964 | C++ | #include <bits/stdc++.h>
#ifdef _DEBUG
#define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " -> " << #x << " = " << x << endl
#else
#define debug(x)
#endif
#define all(s) begin(s), end(s)
#define rall(s) rbegin(s), rend(s)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a,... | a.cc: In function 'int main(int, char**)':
a.cc:15:24: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__int128')
15 | #define put(a) ((cout) << (a) << (endl))
| ~~~~~~ ^~ ~~~
| |
| ... |
s113570183 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int IN... | a.cc: In function 'int main()':
a.cc:37:30: error: 'a' was not declared in this scope
37 | if ((a[i - 1].fs <= a[i].fs * mid) && (a[i - 1].sc <= a[i].sc * mid)){
| ^
a.cc:47:17: error: 'a' was not declared in this scope
47 | a[i].fs*= ub;
... |
s720051736 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
long double t[n], a[n];
for ( int i = 0; i < n; i++){
cin >> t[i] >> a[i];
if ( i == 0)continue;
if ( t[i] >= t[i-1] && a[i] >= a[i-1])continue;
long double mul = max(ceil(t[i-1]/t[i]), ceil(a[i-1]/a[i]));
t[i] = t[i... | a.cc: In function 'int main()':
a.cc:18:11: error: expected primary-expression before 'long'
18 | cout << long long(t[n-1] + a[n-1]) << endl;
| ^~~~
|
s924692496 | p03964 | C++ | //include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
//conversion//include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream... | a.cc:111:12: error: redefinition of 'int toInt(std::string)'
111 | inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
| ^~~~~
a.cc:11:12: note: 'int toInt(std::string)' previously defined here
11 | inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
... |
s254314028 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int i,j,cnt;
int n;
ll t=2,a=2;
cin>>n;
ll T[n],A[n];
for(i=0;i<n;i++)cin>>T[i]>>A[i];
for(i=0;i<n;i++){
j=max((t+T[i]-1)/T[i],(a+A[i]-1)/A[i]);
while(t>T[i]*j || a>A[i]*j)j++;
t=j*T[i];
a=j*A[i];
}
}
cou... | a.cc:19:3: error: 'cout' does not name a type
19 | cout<<t+a;
| ^~~~
a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
s879302382 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#defin... | a.cc: In function 'int main()':
a.cc:288:5: error: expected ';' before 'if'
288 | if(c%e==0&&c/e*f==d)
| ^~
a.cc:291:16: error: expected '}' at end of input
291 | if(e>=f){
| ~^
a.cc:291:16: error: expected '}' at end of input
a.cc:290:13: note: to match this '{'
290 | ... |
s846899865 | p03964 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
ll t, a, A = 1, T = 1;
REP(i, N) {
cint >> t >> a;
ll n = max((T + t - 1) / t, (A + a - 1) / a);
T = n * t;
A = n * a;
}
... | a.cc: In function 'int main()':
a.cc:10:9: error: 'cint' was not declared in this scope; did you mean 'uint'?
10 | cint >> t >> a;
| ^~~~
| uint
|
s280376748 | p03964 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int N;
cin >> N;
ll t, a, A = 1, T = 1;
REP(i, N) {
cint >> t >> a;
ll n = max((T + t - 1) / t, (A + a - 1) / a);
T = n * t[i];
A = n * a[i];
... | a.cc: In function 'int main()':
a.cc:10:9: error: 'cint' was not declared in this scope; did you mean 'uint'?
10 | cint >> t >> a;
| ^~~~
| uint
a.cc:12:18: error: invalid types 'll {aka long long int}[int]' for array subscript
12 | T = n * t[i];
| ... |
s651673982 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> t(N), a(N);
REP(i, N) { cin >> t[i] >> a[i]; }
int A, T = 1;
for(int i = 0; i < N; i++) {
ll x = (T + t[i] - 1) / t[i];
ll y = (A + a[i] - 1) / a[i];
ll n = max(x, y);
T = n * ... | a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
7 | REP(i, N) { cin >> t[i] >> a[i]; }
| ^
a.cc:7:5: error: 'REP' was not declared in this scope
7 | REP(i, N) { cin >> t[i] >> a[i]; }
| ^~~
a.cc:10:9: error: 'll' was not declared in this scope
... |
s950860848 | p03964 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef ... | a.cc: In function 'int main()':
a.cc:62:8: error: conflicting declaration 'll A'
62 | ll A = 1;
| ^
a.cc:56:23: note: previous declaration as 'std::vector<int> A'
56 | vector<int> T(N), A(N);
| ^
a.cc:63:8: error: conflicting declaration 'll T'
63 | ll T = 1... |
s747943115 | p03964 | C++ | #include <iostream>
#include <vector>
using namespace std;
int lcm(int a, int t){
int A = a, T = t;
int gcd = 0;
//euclid;
if(a < t){
int tmp = t;
t = a;
a = tmp;
}
int d = 0;
int r = 0;
while(r != 0){
d = t / a;
r = t % a;
t = r;
a = d;
}
gcd = a;
return (A * T) / gc... | a.cc: In function 'int main()':
a.cc:37:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
37 | int nowA = lcm[i] * i / T[i], nowT = lcm[i] * i / A[i];
| ^
a.cc:37:25: error: invalid operands of types 'int(int, int)' and 'int' to binary 'operator*'
37 | ... |
s502303020 | p03964 | C++ | #include <iostream>
#include <vector>
using namespace std;
int lcm(int a, int t){
int A = a, T = t;
int gcd = 0;
//euclid;
if(a < t){
int tmp = t;
t = a;
a = tmp;
}
int d = 0;
int r = 0;
while(r != 0){
d = t / a;
r = t % a;
t = r;
a = d;
}
gcd = a;
return (A * T) / gc... | a.cc: In function 'int main()':
a.cc:29:11: error: expected ';' before 'vector'
29 | cin >> N
| ^
| ;
30 | vector<int> A(N), T(N), L(N);
| ~~~~~~
a.cc:31:37: error: 'A' was not declared in this scope
31 | for(int i = 0; i < N; i++) cin >> A[i] >> T[i];
| ... |
s387485199 | p03964 | C++ | #include <iostream>
#include <vector>
using namespace std;
int lcm(int a, t){
int A = a, T = t;
int gcd = 0;
//euclid;
if(a < t){
int tmp = t;
t = a;
a = tmp;
}
int d = 0;
int r = 0;
while(r != 0){
d = t / a;
r = t % a;
t = r;
a = d;
}
gcd = a;
return (A * T) / gcd;
}... | a.cc:6:16: error: 't' has not been declared
6 | int lcm(int a, t){
| ^
a.cc: In function 'int lcm(int, int)':
a.cc:7:18: error: 't' was not declared in this scope
7 | int A = a, T = t;
| ^
a.cc: In function 'int main()':
a.cc:29:11: error: expected ';' before 'vecto... |
s968505617 | p03964 | C++ | #include <isotream>
#include <vector>
using namespace std;
int lcm(int a, t){
int A = a, T = t;
int gcd = 0;
//euclid;
if(a < t){
int tmp = t;
t = a;
a = tmp;
}
int d = 0;
int r = 0;
while(r != 0){
d = t / a;
r = t % a;
t = r;
a = d;
}
gcd = a;
return (A * T) / gcd;
}... | a.cc:1:10: fatal error: isotream: No such file or directory
1 | #include <isotream>
| ^~~~~~~~~~
compilation terminated.
|
s810598657 | p03964 | C++ | 3 #include <iostream>
#include <cstring>
#include <map>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <set>
#include <vector>
#include <queue>
#include <list>
#include <numeric>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <math.h>
#include <stack>
#include <climits>
#include <bi... | a.cc:1:3: error: stray '#' in program
1 | 3 #include <iostream>
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 #include <iostream>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/bits/stl_tree.h:63,
... |
s964741776 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int kuriage(long long int x, long long int y) {
return (x + (y - 1)) / y;
}
int main() {
int n;
cin >> n;
long long int a, b;
cin >> a >> b;
rep (i, n - 1) {
long long int c, d;
... | a.cc: In function 'int main()':
a.cc:22:13: error: expected ',' or ';' before 'a'
22 | a = c * kake; b = d * kake;
| ^
|
s068894814 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
// def
#define debug(x) cout << #x << ": " << x << endl
#define out(x) cout << x << endl
#define repeat(i, a, b) for (int i = (a); i < (b); i++)
#define revrepeat(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define revre... | a.cc: In function 'int main()':
a.cc:28:5: error: 'x' was not declared in this scope
28 | x, y;
| ^
a.cc:28:8: error: 'y' was not declared in this scope
28 | x, y;
| ^
|
s153641478 | p03964 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; ++i)
#define REPP(i, n) for(int i = 1; i <= n; ++i)
#define REPR(i, n) for(int i = n-1; i >= 0; --i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
t... | a.cc: In function 'int main()':
a.cc:20:22: error: conflicting declaration 'll n'
20 | ll x = 1, y = 1, n= 1;;
| ^
a.cc:17:9: note: previous declaration as 'int n'
17 | int n; cin >> n;
| ^
|
s992330708 | p03964 | C++ |
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<bitset>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template<class T> inl... | a.cc: In function 'int main()':
a.cc:39:10: error: incomplete type 'std::ios' {aka 'std::basic_ios<char>'} used in nested name specifier
39 | ios::sync_with_stdio(false);
| ^~~~~~~~~~~~~~~
a.cc:40:5: error: 'cin' was not declared in this scope
40 | cin.tie(0);
| ^~~
a.cc:15:1: not... |
s011974550 | p03964 | C++ | #include<iostream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<bitset>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
tem... | a.cc: In function 'int main()':
a.cc:51:5: error: 'lnt' was not declared in this scope; did you mean 'int'?
51 | lnt A = 1;
| ^~~
| int
a.cc:54:17: error: 'A' was not declared in this scope
54 | ll A2 = A/a[i];
| ^
a.cc:61:11: error: 'A' was not declared in th... |
s678139121 | p03964 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int xRatio[]=new int[n];
int yRatio[]=new int[n];
int x[]=new int[n];
int y[]=new int[n];
for(int i=0;i<n;i++){
xRatio[i]=sc.nextInt();
yRatio[i... | Main.java:24: error: cannot find symbol
System.out.println(x[i]+y[i]);
^
symbol: variable i
location: class Main
Main.java:24: error: cannot find symbol
System.out.println(x[i]+y[i]);
^
symbol: variable i
location: class Main
2 errors
|
s604071460 | p03964 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int xRatio[]=new int[n];
int yRatio[]=new int[n];
int x[]=new int[n];
int y[]=new int[n];
for(int i=0;i<n;i++){
xRatio[i]=sc.nextInt();
yRatio[i... | Main.java:24: error: cannot find symbol
System.out.println(x[i]+y[i]);
^
symbol: variable i
location: class Main
Main.java:24: error: cannot find symbol
System.out.println(x[i]+y[i]);
^
symbol: variable i
location: class Main
2 errors
|
s017788226 | p03964 | C++ | int main() {
int n;
cin >> n;
int a[n], b[n];
for (int i = 0; i < n; i++)
cin >> a[i] >> b[i];
ll l = a[0], r = b[0];
for (int i = 1; i < n; i++) {
ll x = a[i], y = b[i];
ll a1 = l / x + (l % x == 0 ? 0 : 1);
ll a2 = r / y + (r % y == 0 ? 0 : 1);
ll k = ma... | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:7:5: error: 'll' was not declared in this scope
7 | ll l = a[0], r = b[0];
| ^~
a.cc:9:11: error: expected ';' before 'x'
9 | ll x = a[i], y = b[i];
| ... |
s026356821 | p03964 | C++ | #include<iostresm>
#include<cmath>
using namespace std;
int main{
int N,T[],A[],i,t=1,a=1,addt=0,adda=0;
cin>>N;
T = new int[N];
A = new int[N];
for(i=0;i<N;i++){
cin>>T[i]>>A[i];
}
t=T[0];
a=A[0];
for(i=1;i<N;i++,addt=0,adda=0){
while(fmod(((a+adda),A[i]))==0){
adda++;
}
ad... | a.cc:1:9: fatal error: iostresm: No such file or directory
1 | #include<iostresm>
| ^~~~~~~~~~
compilation terminated.
|
s318894996 | p03964 | C++ | #include<cstdio>
int main(){
int n;
scanf("%d", &n);
int t[n], a[n];
for(int i=0; i<n; i++){
scanf("%d %d", &t[i], &a[i]);
}
long long T, A, n;
for(int i = 0; i < n; i++){
if(i == 0){
n = 1;
}
else{
long long x = T / t[i];
long long y = A / a[i];
if(x != 0) x... | a.cc: In function 'int main()':
a.cc:11:19: error: conflicting declaration 'long long int n'
11 | long long T, A, n;
| ^
a.cc:3:7: note: previous declaration as 'int n'
3 | int n;
| ^
a.cc:22:11: error: 'max' was not declared in this scope
22 | n = max(x,y);
... |
s164498723 | p03964 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long a = sc.nextLong();
long b = sc.nextLong();
while (n-- > 1) {
long... | Main.java:14: error: no suitable method found for max(double)
long x = (long)Math.ceil(Math.max((double)a / newA), Math.max((double)b / newB));
^
method Math.max(int,int) is not applicable
(actual and formal argument lists differ... |
s079952785 | p03964 | Java |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.stream.IntStream;
import java.util.stream.St... | Main.java:125: error: ';' expected
return w1
^
1 error
|
s488386856 | p03964 | C++ | #include <iostream>
#include <vector>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <math.h>
#include <util.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> tvotes(n);
vector<int> avotes(n);
for(int i = 0; i < n; i++) {
int t, a;
cin >> t >> a;
tvotes[i] = t;
... | a.cc:7:10: fatal error: util.h: No such file or directory
7 | #include <util.h>
| ^~~~~~~~
compilation terminated.
|
s546751178 | p03964 | 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 FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a)... | a.cc: In function 'int main()':
a.cc:23:9: error: 'll' was not declared in this scope
23 | ll t=0, a=0;
| ^~
a.cc:24:16: error: 't' was not declared in this scope
24 | cin >> t >> a;
| ^
a.cc:24:21: error: 'a' was not declared in this scope
24 | cin >>... |
s661688326 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void){
int N;
cin>>N;
ll aok,tkhs;
cin>>aok>>tkhs;
if (N==1) {
cout<<aok+tkhs<<endl;
return 0;
}
for (int i=1;i<N;i++){
int a,t;
cin>>a>>t;
ll n=1;
/*
while(a*... | a.cc: In function 'int main()':
a.cc:30:14: error: expected '}' at end of input
30 | return 0;
| ^
a.cc:5:15: note: to match this '{'
5 | int main(void){
| ^
|
s536551720 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
long int main() {
int N;
cin >> N;
vector<long int> T(N),A(N),B(N);
for (int i=0;i<N;i++) {
cin >> T.at(i) >> A.at(i);
}
for (int i=0;i<N-1;i++) {
B.at(i+1) = max( (T.at(i)-1) / T.at(i+1) , (A.at(i)-1) / A.at(i+1)) + 1;
T.at(i+1) = T.at(i+1) * B.at(... | a.cc:4:6: error: '::main' must return 'int'
4 | long int main() {
| ^~~
|
s348955999 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> T(N),A(N),B(N);
for (int i=0;i<N;i++) {
cin >> T.at(i) >> A.at(i);
}
for (int i=0;i<N-1;i++) {
B.at(i+1) = max( (T.at(i)-1) / T.at(i+1) , (A.at(i)-1) / A.at(i+1) ) + 1;
T.at(i+1) = T.at(i+1) * B.at(i+1);
... | a.cc: In function 'int main()':
a.cc:17:33: error: expected ';' before 'cout'
17 | answer = T.at(N-1) + A.at(N-1)
| ^
| ;
18 | cout << answer << endl;
| ~~~~
|
s379743416 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main(){
ll n; cin >> n;
ll t[n],a[n];
for(ll i = 0; i < n;... | a.cc: In function 'int main()':
a.cc:20:5: error: 'mx' was not declared in this scope; did you mean 'x'?
20 | mx = 0;
| ^~
| x
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.