submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s723359760 | p03964 | Java | import java.util.Scanner;
public class Main{
static Long T[];
static Long A[];
static Long TA[];
static Long TT[];
static int N;
static Long ans=0;
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
T = new Long[N];
TT = new Long[N];
TA = ... | Main.java:9: error: incompatible types: int cannot be converted to Long
static Long ans=0;
^
1 error
|
s119743228 | p03964 | Java | import java.util.Scanner;
public class Main{
static int T[];
static int A[];
static Long TA[];
static Long TT[];
static int N;
static int ans=0;
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
T = new int[N];
TT = new Long[N];
TA = new ... | Main.java:22: error: incompatible types: int cannot be converted to Long
TT[0] = T[0];
^
Main.java:23: error: incompatible types: int cannot be converted to Long
TA[0] = A[0];
^
Main.java:33: error: incompatible types: possible lossy conversion from long to int
int k = Math.max((TT... |
s267870876 | p03964 | C++ | using namespace std;
#include<bits/stdc++.h>
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0)
#define END return EXIT_SUCCESS
#define FOR(I,A,B) for((I)=(A);(I)<(B);(I)++)
#define REP(I,N) FOR(I,0,N)
#define UP(I,A,B) for((I)=(A);(I)<=(B);(I)++)
#define DW(I,A,B) for((I)=(A);(I)>=(B);(I)--)
#define IN(P) cin>>(P)
... | a.cc:15:16: error: 'cout' does not name a type
15 | #define OUT(P) cout<<P<<endl
| ^~~~
a.cc:40:3: note: in expansion of macro 'OUT'
40 | OUT(A+B);
| ^~~
a.cc:41:1: error: expected declaration before '}' token
41 | }
| ^
|
s304534223 | p03964 | C++ | from math import *
N = int(input())
T = []
A = []
for i in range(0, N):
ti, ai = [int(x) for x in input().split()]
T.append(ti)
A.append(ai)
prevT = T[0]
prevA = A[0]
for i in range(1, N):
nextfacT = int(ceil(prevT / T[i]))
nextfacA = int(ceil(prevA / A[i]))
nextfac = max(nextfacT, nextfacA)
... | a.cc:1:1: error: 'from' does not name a type
1 | from math import *
| ^~~~
|
s007495005 | p03964 | C++ | #pragma comment(linker, "/stack:20000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include<bits/stdc++.h>
/*#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/detail/standard_policies.hpp>*/
#define sz(s) (int)(s.size())
... | a.cc: In function 'int32_t main()':
a.cc:45:17: error: 'k' was not declared in this scope
45 | k = max((T+t[i]-1)/t[i],(A+a[i]-1)/a[i]);
| ^
|
s527869623 | p03964 | C++ | #include <bits/stdc++.h>
#define full(c) c.begin(), c.end()
#define vector2d(name, type, h, w, init) vector<vector<type>> name(h, vector<type>(w, init))
typedef signed long long int ll;
typedef unsigned long long int ull;
const int PRIME=1000000007;
using namespace std;
int main(){
ll n,ca,ct;
cin>>n;
cin>>ct>>c... | a.cc: In function 'int main()':
a.cc:18:5: error: 'na' was not declared in this scope; did you mean 'a'?
18 | na=a;
| ^~
| a
a.cc:19:5: error: 'nt' was not declared in this scope; did you mean 't'?
19 | nt=t;
| ^~
| t
|
s444098440 | p03964 | Java | import java.util.Scanner;
public class Main {
@SuppressWarnings("resource")
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int n=scanner.nextInt();
long t[]=new long[n];
long a[]=new long[n];
for(int i=0;i<n;i++) {
t[i]=scanner.nextInt();
a[i]=scanner.nextInt();
... | Main.java:15: error: cannot find symbol
long p=Math.max(brd_t/t[i], brd_a/a[i]);
^
symbol: variable brd_t
location: class Main
Main.java:15: error: cannot find symbol
long p=Math.max(brd_t/t[i], brd_a/a[i]);
^
symbol: variable brd_a
location: class Mai... |
s162256423 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long x,y;
int n,t,a;
scanf("%d",&n);
scanf("%lld %lld",&x,&y);
for (int i=1;i<n;i++) {
scanf("%d %d",&t,&a);
if (x<=t && y<=a) {
x=t;
y=a;
} else {
long long tk=t*max(x/t,y/a);... | a.cc: In function 'int main()':
a.cc:20:29: error: 'j' was not declared in this scope
20 | x=tk+(t*j);
| ^
|
s955839903 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >>N;
int a,af,b,bf;
cin >> af>>bf;
for(int i=1;i<N;i++){
cin >> a>> b;
for(int j=1;j<1001;j++){
if(a*j>=af %% b*j>=bf){
af = a*j;
bf = b*j;
}
}
}
cout << af+bf << endl;
} | a.cc: In function 'int main()':
a.cc:12:19: error: expected primary-expression before '%' token
12 | if(a*j>=af %% b*j>=bf){
| ^
|
s862869836 | p03964 | Java | class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int reports=sc.nextInt();
long takahashi=sc.nextLong();
long aoki=sc.nextLong();
for(int i=1; i<reports; i++) {
long next_takahashi=sc.nextLong();
long next_aoki=sc.nextLong();
long multiplier=Math.max(takahashi/... | Main.java:3: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s723779623 | p03964 | C++ | #include<iostream>
int routine(int t,int a,int num){
int i=1;
int n=a+t;
while(n>=num){
n=n*i;
i++;
}
return n;
}
int main(){
int t,a;
int turn;
int num;
int i=1;
std::cin>>turn;
while(turn!=i){
std::cin>>t>>a;
n=routine(t,a,num);
i++;
}
std::cout<<n<<std::endl;
}
| a.cc: In function 'int main()':
a.cc:23:5: error: 'n' was not declared in this scope
23 | n=routine(t,a,num);
| ^
a.cc:27:14: error: 'n' was not declared in this scope
27 | std::cout<<n<<std::endl;
| ^
|
s484363022 | p03964 | C++ |
#include <cstdint>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int64_t,int64_t>> t;
for (int i = 0; i < n; ++i) {
int64_t ti, ai;
cin >> ti >> ai;
t.push_back(make_pair(ti, ai));
}
auto p = t[0];
for (int i = 1; i < t.size(); ... | a.cc: In function 'int main()':
a.cc:27:34: error: no matching function for call to 'max(long long int, const long int&)'
27 | int64_t mul = max(1LL, max(mul1, mul2));
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s265484434 | p03964 | C++ |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int64_t,int64_t>> t;
for (int i = 0; i < n; ++i) {
int64_t ti, ai;
cin >> ti >> ai;
t.push_back(make_pair(ti, ai));
}
auto p = t[0];
for (int i = 1; i < t.size(); ++i) {
auto pn = ... | a.cc: In function 'int main()':
a.cc:26:34: error: no matching function for call to 'max(long long int, const long int&)'
26 | int64_t mul = max(1LL, max(mul1, mul2));
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s385192369 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long N,T,A,t,a;
cin>>N;
t=a=1;
for(long long n=0;n<N;n++)
{
cin>>T>>A;
long long k=max((t+T-1)/T), ((a+A-1)/A);
t=k*T;
a=k*A;
}
cout<<t+A<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:32: error: no matching function for call to 'max(long long int)'
11 | long long k=max((t+T-1)/T), ((a+A-1)/A);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-l... |
s446250546 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long N,T,A,t,a;
cin>>N;
t-a=l;
for(long long n=0;n<N;n++){
cin>>T>>A;
long long n=max((t+T-l)/T,(a+A-l)/A);
t=k*T;
a=k*A;
}
cout<<t+a<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:13: error: 'l' was not declared in this scope
6 | t-a=l;
| ^
a.cc:9:19: error: redeclaration of 'long long int n'
9 | long long n=max((t+T-l)/T,(a+A-l)/A);
| ^
a.cc:7:23: note: 'long long int n' previously declared ... |
s542867860 | p03964 | C++ | #include <iostream>
using namespace std;
int main(){
long long N,T,A,t,a;
cin>>N;
t=a=1;
for(long long n=0;n<N;n++)
{
cin>>T>>A;
long long k=max((t+T-1)/T,(A+a-1)/A)
t=k*T;
a=A*k;
cout<<t<<" "<<a<<endl;
}
cout<<t+a<<endl;
} | a.cc: In function 'int main()':
a.cc:11:17: error: expected ',' or ';' before 't'
11 | t=k*T;
| ^
|
s428351630 | p03964 | C++ | #include <iostream>
using namespace std;
int main(){
long long N,T,A,t,a;
cin>>N;
t=a=1;
for(long long n=0;n<N;n++)
{
cin>>T>>A;
long long T=max((t+T-1)/T,(A+a-1)/A)
t=k*T;
a=A*k;
cout<<t<<" "<<a<<endl;
}
cout<<t+a<<endl;
} | a.cc: In function 'int main()':
a.cc:11:17: error: expected ',' or ';' before 't'
11 | t=k*T;
| ^
a.cc:12:21: error: 'k' was not declared in this scope
12 | a=A*k;
| ^
|
s425084284 | p03964 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
int n;cin>>n;--n;
int a,b,t,s,tmpa,tmpb;cin>>a>>b;
for(int i=0;i<n;++i){
cin>>t>>s;tmpa=t,tmpb=s;
int m=max((a+t-1)/t,(b+s-1)/s));
a=m*t;b=m*s;
}cout<<a+b;
}
| a.cc: In function 'int main()':
a.cc:8:39: error: expected ',' or ';' before ')' token
8 | int m=max((a+t-1)/t,(b+s-1)/s));
| ^
|
s422386319 | p03964 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
int n;cin>>n;--n;
int a,b,t,s,tmpa,tmpb;cin>>a>>b;
for(int i=0;i<n;++i){
cin>>t>>s;tmpa=t,tmpb=s;
int m=max((a+t-1)/t),(b+s-1)/s));
a=m*t;b=m*s;
}cout<<a+b;
} | a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'max(int)'
8 | int m=max((a+t-1)/t),(b+s-1)/s));
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s413947454 | p03964 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
int n;cin>>n;--n;
int a,b,t,s,tmpa,tmpb;cin>>a>>b;
for(int i=0;i<n;++i){
cin>>t>>s;tmpa=t,tmpb=s;
int m=max((a+t-1)/t),ceil((b+s-1)/s));
a=m*t;b=m*s;
}cout<<a+b;
} | a.cc: In function 'int main()':
a.cc:8:18: error: no matching function for call to 'max(int)'
8 | int m=max((a+t-1)/t),ceil((b+s-1)/s));
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s366869540 | p03964 | C++ | 4
1 1
1 1
1 5
1 100 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4
| ^
|
s723266755 | p03964 | C++ | #include<iostream>
#include<vector>
using namespace std;
long minCommonMulti(long a,long b){
long n = 2;
vector<long> v;
//从2开始寻找可以被整除的数 ,一个数可以被整除多次
while(b>1 || a>1){
bool devided=0;//本轮是否有被整除,无论哪个都可以
if( b /n * n == b){
b=b/n;
devided=1;
}
if( a /n * n == a){
a=a/n;
devided=1;
}
if(d... | a.cc:36:20: error: expected ',' or '...' before 'nums'
36 | bool allOne(long[] nums){
| ^~~~
a.cc: In function 'bool allOne(long int*)':
a.cc:37:23: error: 'nums' was not declared in this scope
37 | for(int i=0;i<nums.length();i++){
| ^~~~
a.cc: At glob... |
s881333092 | p03964 | C++ | import math
N = int(input())
T = 1
A = 1
for i in range(N):
ti, ai = map(int, input().split())
m = max(math.ceil(T / min(T, ti)), math.ceil(A / min(A, ai)))
T = ti * m
A = ai * m
print(int(T + A)) | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s287923159 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
unsigned long long A,B;
cin>>A>>B;
for(int i=1;i<N;i++){
//cout<<A<<","<<B<<endl;
unsigned long long t,s;
cin>>t>>s;
long long c=max((A+t-1)/t,(B+s-1)/s);
A=t*max(c,1);
B=s*max(c,1);
}
cout<<(unsigned long long... | a.cc: In function 'int main()':
a.cc:14:12: error: no matching function for call to 'max(long long int&, int)'
14 | A=t*max(c,1);
| ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.c... |
s508617140 | p03964 | C++ | #include <bits/stdc++.h>
#define FOR(I,X,Y) for(int (I)=(X);(I)<(Y);(I)++)
#define REP(I,X,Y) for(int (I)=(Y)-1;(I)>=(X);(I)--)
#define ALL(X) (X).begin(),(X).end()
#define INF 1000000007
#define LINF 1000000000000000007
typedef long long ll;
using namespace std;
int main(){
ll N,T,A,t=1,a=1,q;
cin >> N;
FOR(i,0... | a.cc: In function 'int main()':
a.cc:20:23: error: expected '}' at end of input
20 | cout << t+a << endl;
| ^
a.cc:10:11: note: to match this '{'
10 | int main(){
| ^
|
s858209494 | p03964 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
typedef long long LL;
inline LL gcd(LL a,LL b)
{
return !b?a:gcd(b,a%b);
}
int main()
{
int n;
scanf("%d",&n);
LL a,b,A=1,B=1;
LL G;
for(int i=1;i<=n;i++)
{
scanf("%lld %lld",&a,&b);
if(a>A && b>B) A=a,B=b;
else
{
G=max((A/a)+(A%a?1:0),B/b+(... | a.cc: In function 'int main()':
a.cc:23:60: error: expected ')' before ';' token
23 | G=max((A/a)+(A%a?1:0),B/b+(B%b?1:0);
| ~ ^
| )
|
s711045025 | p03964 | C++ | N = int(input())
TA = []
for i in range(N):
TA.append(list(map(int, input().split())))
t_real = [TA[0][0]]
a_real = [TA[0][1]]
for i in range(1,N):
t_cand = (t_real[i-1]//TA[i][0] + bool(t_real[i-1]%TA[i][0])) * TA[i][0]
a_cand = (a_real[i-1]//TA[i][1] + bool(a_real[i-1]%TA[i][1])) * TA[i][1]
if ... | a.cc:1:1: error: 'N' does not name a type
1 | N = int(input())
| ^
|
s114480866 | p03964 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int t[1010], a[1010];
for (int i = 0; i < n; ++i) {
cin >> t[i] >> a[i];
}
int vt = t[0];
int va = a[0];
for (int i = 0; i < n; ++i) {
if (vt * a[i] < va * t[i]) {
while (1) {
vt++;
if (vt * a[i] ... | a.cc: In function 'int main()':
a.cc:20:16: error: lvalue required as left operand of assignment
20 | if (vt * a[i] = va * t[i])
| ~~~^~~~~~
a.cc:26:16: error: lvalue required as left operand of assignment
26 | if (vt * a[i] = va * t[i])
| ~~~^~~~~~
|
s661766799 | p03964 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
int main() {
int n;
cin>>n;
long long r=0,l=0;
cin>>l>>r;
for (int i = 1; i < n; ++i) {
int ll,rr;
cin>>ll>>rr;
int ra = max(int((r + rr - 1) / rr), int((l + ll - 1) / ll));
l=ll*ra;
r=rr*ra... | cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:2:13: error: expected primary-expression before 'long'
2 | #define int long long
| ^~~~
a.cc:14:22: note: in expansion of macro 'int'
14 | int ra = max(int((r + rr - 1) / rr), int((l + ll - 1) / ll));
... |
s547294036 | p03964 | C++ | #include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main(){
int n;
cin >> n;
long long int T = 1, A = 1;
long long int sum = T + A;
for(int i = 0; i < n; i++){
long long int t, a;
cin >> t;
cin >> a;
long long int k = max(1+((A-1)/a), 1... | a.cc: In function 'int main()':
a.cc:15:48: error: 'B' was not declared in this scope
15 | long long int k = max(1+((A-1)/a), 1+((B-1)/b));
| ^
a.cc:15:53: error: 'b' was not declared in this scope
15 | long long int k = max(1+((A-1)/a), 1+((B-1... |
s074478976 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> P;
map <int,int> mp;
vector<int> V;
list<int> L;
stack<int> S;
queue<int> Q;
deque<int> dq;
#define INF (1<<30)
#define INFLL (1ll<<60)
#define EPS (1e-10)
static const int MAX=100000;
static const... | a.cc:20:1: error: expected initializer before 'll'
20 | ll T[2],A[2],k1,k2;
| ^~
a.cc: In function 'int main()':
a.cc:25:10: error: 'N' was not declared in this scope
25 | cin>>N;
| ^
a.cc:26:10: error: 'T' was not declared in this scope
26 | cin>>T[0]>>A[0];
| ^
a.c... |
s624297181 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n;
cin >> n;
ll a,b;
ll x=1,y-1;
for(int i=0;i<n;i++){
cin >> a >> b;
ll k=max((x+a-1)/a,(y+b-1)/b);
x=a*k;
y=b*k;
}
cout << x + y << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:13: error: expected initializer before '-' token
11 | ll x=1,y-1;
| ^
a.cc:15:29: error: 'y' was not declared in this scope
15 | ll k=max((x+a-1)/a,(y+b-1)/b);
| ^
a.cc:20:17: error: 'y' was not declared in thi... |
s280192424 | p03964 | C++ | //C++14 (Clang 3.8.0)
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#includ... | a.cc: In function 'int main()':
a.cc:48:5: error: expected ',' or ';' before 's1'
48 | s1=nn*tmp1;
| ^~
|
s747750869 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n; cin >> n;
vector<ll> T(n), A(n);
for (int i = 0; i < n; ++i) cin >> T[i] >> A[i];
ll t = 1; a = 1;
for (int i = 0; i < n; ++i) {
ll j = (t+T[i]-1)/T[i];
j = max(j, (a+A[i]-1)/A[i]);
t = T[i]*j, a = A[i]*j;
}... | a.cc: In function 'int main()':
a.cc:9:13: error: 'a' was not declared in this scope
9 | ll t = 1; a = 1;
| ^
|
s780036937 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n; cin >> n;
vector<ll> a(n), t(n);
for (int i = 0; i < n; ++i) cin >> a[i] >> t[i];
ll ansa = 0, anst = 0;
for (int i = 0; i < n; ++i) {
int j = (ansa+a[i]-1)/a[i];
j = max(j, (anst+t[i]-1)/t[i]);
ansa = j*ansa,... | a.cc: In function 'int main()':
a.cc:12:12: error: no matching function for call to 'max(int&, ll)'
12 | j = max(j, (anst+t[i]-1)/t[i]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s745193159 | p03964 | C++ | #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inc... | a.cc:38:5: error: ambiguating new declaration of 'int ceil(double)'
38 | int ceil(double a) {
| ^~~~
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from a.cc:... |
s469471456 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ROF(i,a,b) for(int i=(a)-1;i>=(b);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend() //sortで大きい順
#define UNIQUE(v) v.erase(unique(all(v)),v.end())
#def... | a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
20 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:29:12: error: no matching function for call to 'max(ll&, int)'
29 | m = max(m, 1);
| ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm... |
s723720811 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ROF(i,a,b) for(int i=(a)-1;i>=(b);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend() //sortで大きい順
#define UNIQUE(v) v.erase(unique(all(v)),v.end())
#def... | a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
20 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:34:3: error: expected ',' or ';' before 'cout'
34 | cout << ans << endl;
| ^~~~
|
s021689075 | p03964 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int N,i,j,k,A = 1,B = 1;
cin >> N;
int n[N][2];
for(i = 0; i < N; i++) {
cin >> n[i][0] >> n[i][1];
}
long long int a = n[0][0],b = n[0][1];
for(i = 1; i < N; i++) {
for(j = 0; j < 1000; j++) {
... | a.cc: In function 'int main()':
a.cc:17:20: error: lvalue required as increment operand
17 | (b * B)++;
| ~~~^~~~
a.cc:19:20: error: lvalue required as increment operand
19 | (a * A)++;
| ~~~^~~~
|
s121673762 | p03964 | C | #include<stdio.h>
int main(void){
int n,i;
long long t,a,anst=1,ansa=1,tt,ta;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lld %lld",&t,&a);
if(anst%t)tt=anst/t+1;
else tt=anst/t;
if(ansa%a)ta=ansa/a+1;
else ta=ansa/a;
if(tt>ta){
anst=t*tt;
ansa=a*tt
}
else{
anst=t*ta;
ansa=a*ta;
}
}
printf("%lld\n",anst+ansa);
return 0;
... | main.c: In function 'main':
main.c:14:10: error: expected ';' before '}' token
14 | ansa=a*tt
| ^
| ;
15 | }
| ~
|
s361391947 | p03964 | C++ | =#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
using namespace std;
long long N;
long long T[1010];
long long A[1010];
int main()
{
cin >> N;
for(long long i = 0;i < N;i++)
{
cin >> T[i] >> A[i];
}
for(long lo... | a.cc:1:2: error: stray '#' in program
1 | =#include <iostream>
| ^
a.cc:1:1: error: expected unqualified-id before '=' token
1 | =#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:... |
s712246594 | p03964 | C++ | nclude <iostream>
#include <numeric>
using namespace std;
int main(){
int t ;
int count = 0;
// for reading in values
int first;
int second;
cin >> t ;
int* arrayT = new int[t];
int* arrayA = new int[t];
while (count < t){
cin >> first >> second;
arrayT[count] = first;
arrayA[count] = secon... | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude <iostream>
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator_base_types.h:67,
from /usr/include/c++/14/numeric:61,
from a.cc:2:
/usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been de... |
s131318254 | p03964 | C++ | int main(){
int t ;
int count = 0;
// for reading in values
int a;
int b;
cin >> t ;
int* arrayT = new int[t];
int* arrayA = new int[t];
while (count < t){
cin >> a >> b;
arrayT[count] = a;
arrayA[count] = b;
count++;
}
//current number of votes for t and a
int Tvotes;
int Avotes;
Tvo... | a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> t ;
| ^~~
a.cc:160:1: error: 'cout' was not declared in this scope; did you mean 'count'?
160 | cout << Avotes + Tvotes;
| ^~~~
| count
|
s578224978 | p03964 | C++ | #include <iostream>
#include <numeric>
using namespace std;
int main(){
int t ;
int count = 0;
// for reading in values
int a;
int b;
cin >> t ;
int* arrayT = new int[t];
int* arrayA = new int[t];
while (count < t){
cin >> a >> b;
arrayT[count] = a;
arrayA[count] = b;
count++;
}
//curr... | a.cc: In function 'int main()':
a.cc:86:1: error: expected '}' before 'else'
86 | else{
| ^~~~
a.cc:77:20: note: to match this '{'
77 | if(Tratio > Aratio){
| ^
a.cc:99:6: error: 'TTT' was not declared in this scope
99 | if (!TTT || !AAA){
| ^~~
a.cc:99:14: error: 'AAA... |
s388861796 | p03964 | C++ | int main() {
int n;
long int a, b;
long int ca, cb, sa, sb, ma, mb;
long int mag;
cin >> n;
cin >> a >> b;
n--;
ca = a, cb = b;
for (unsigned i = 0; i < n; i++) {
cin >> a >> b;
sa = ca / a, ma = ca % a;
sb = cb / b, mb = cb % b;
if (ma != 0)
sa++;
if (mb != 0)
sb++;
... | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> n;
| ^~~
a.cc:18:11: error: 'max' was not declared in this scope; did you mean 'mag'?
18 | mag = max(sa, sb);
| ^~~
| mag
a.cc:21:3: error: 'cout' was not declared in thi... |
s694915579 | p03964 | Java | import java.util.Scanner;
public class Prob3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] original = new int[2];
int[] multiples = new int[2];
int[] manipulate = new int[2];
int t = sc.nextInt();
original[0] = sc.nextInt();
... | Main.java:3: error: class Prob3 is public, should be declared in a file named Prob3.java
public class Prob3 {
^
1 error
|
s265990186 | p03964 | C++ | #include <iostream>
#include <numeric>
using namespace std;
//A
// int main(){
// int a,b,c,d,e,f;
// int t;
// int count = 0;
//
// cin >> t ;
// int* array = new int[t];
// while (count != t){
// cin >> a >> b;
// array[count] = a % b;
// count++;
// }
//
//
//
// for (int a = 0; a < t ; a++){... | a.cc: In function 'int main()':
a.cc:59:15: error: 'lcd' was not declared in this scope
59 | int min = lcd(totalCurr, totalPrev)
| ^~~
a.cc:63:25: error: 'lol' was not declared in this scope
63 | Avotes = currentA * lol;
| ^~~
|
s706251412 | p03964 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int main()
{
int N, T[1000], A[1000];
cin >> N;
for(int i=0; i<N; i++) cin >> T[i] >> A[i];
long long a = T[0], b = A[0];
for(int i=1; i<N; i++){
long long n = max(ceil(1.0 * a/(1LL*T[i])), ce... | a.cc: In function 'int main()':
a.cc:16:77: error: expected ')' before ';' token
16 | long long n = max(ceil(1.0 * a/(1LL*T[i])), ceil(1.0 * b/(1LL*A[i]));
| ~ ^
| ... |
s337966293 | p03964 | C++ | #include <iostream>
#include<sstream>
#include<vector>
#include<iterator>
#include<numeric>
using namespace std;
int main(void)
{
int N;
cin >> N;
long long cnt[2];
cin >> cnt[0] >> cnt[1];
for(int i=1; i<N; i++)
{
int T, A;
cin >> T >> A;
long long n = max(ceil(1.0*cnt[0]/T), ceil(1.0*cnt[1]/A));
cnt... | a.cc: In function 'int main()':
a.cc:21:35: error: 'ceil' was not declared in this scope
21 | long long n = max(ceil(1.0*cnt[0]/T), ceil(1.0*cnt[1]/A));
| ^~~~
|
s461594023 | p03964 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define out(s) cout<<(s)<<endl;
using ll = long long;
int main()
{
int N;
ll ans;
ll T_sum, A_sum;
cin >> N;
cin >> T_sum >> A_sum;
for (size_t i = 0; i < N-1; i++)
{
int Ti, Ai;
cin >> Ti >> Ai;
int x, y, k;
k... | a.cc: In function 'int main()':
a.cc:21:21: error: 'ceil' was not declared in this scope
21 | k = ceil(max((double)T_sum / Ti, (double)A_sum / Ai));
| ^~~~
|
s463671917 | p03964 | C++ | import java.util.*;
public class Main {
public static void main(String []args){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int[] t = new int[n];
int[] a = new int[n];
for (int i = 0; i < n; i++) {
t[i] = in.nextInt();
a[i] = in.nextInt();
}
long tt = t[0];
long aa ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s149383818 | p03964 | Java | import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args){
int n = sc.nextInt();
long t = sc.nextLong();
long a = sc.nextLong();
long nt = 0,na = 0;
for (int i = 1;i < n;i++) {
T = sc.n... | Main.java:11: error: cannot find symbol
T = sc.nextLong();
^
symbol: variable T
location: class Main
Main.java:12: error: cannot find symbol
A= sc.nextLong();
^
symbol: variable A
location: class Main
Main.java:13: error: cannot find symbol
long m ... |
s204513170 | p03964 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long[] t = new long[N];
long[] a = new long[N];
for(int i = 0; i < N; i++) {
t[i] = sc.nextLong();
a[i] = sc.nextLong();
}
// i回目の投票時が(t... | Main.java:17: error: cannot find symbol
BigDecimal t1 = new BigDecimal(t[i - 1] * dp[i - 1]);
^
symbol: class BigDecimal
location: class Main
Main.java:17: error: cannot find symbol
BigDecimal t1 = new BigDecimal(t[i - 1] * dp[i - 1]);
^
symbol: class BigDecimal
l... |
s403551815 | p03964 | C++ | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;} | a.cc:1:30: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;}
| ... |
s188354059 | p03964 | C++ | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;} | a.cc:1:30: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++.h>using namespace std;main(){long long n,t[1000],a[1000],j;cin>>n>>t[0]>>a[0];for(int i=1;i<n;i++){cin>>t[i]>>a[i];j=max((a[i-1]-1)/a[i],(t[i-1]-1)/t[i])+1;a[i]*=j;t[i]*=j;}cout<<a[n-1]+t[n-1]<<endl;}
| ... |
s179727770 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long n,t[1000]={},a[1000]={};
cin>>n;
for(int i=0;i<n;i++){
cin>>t[i]>>a[i];
if(i)
long long j=1;
if((a[i-1]-1)/a[i]>(t[i-1]-1)/t[i]) j+=(a[i-1]-1)/a[i];
else j+=(t[i-1]-1)/t[i];
a[i]*=j;
t[i]*=j;
}
cout<<a[n-1]+t[n-1]<<endl;
return ... | a.cc: In function 'int main()':
a.cc:10:40: error: 'j' was not declared in this scope
10 | if((a[i-1]-1)/a[i]>(t[i-1]-1)/t[i]) j+=(a[i-1]-1)/a[i];
| ^
a.cc:11:9: error: 'j' was not declared in this scope
11 | else j+=(t[i-1]-1)/t[i];
| ^
a.cc:12:10:... |
s201805079 | p03964 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
int t[1000]={},a[1000]={};
cin>>n;
for(int i=0;i<n;i++){
cin>>t[i]>>a[i];
if(i)
if(a[i-1]>a[i] || t[i-1]>t[i]){
if(a[i-1]/a[i]>=t[i-1]/t[i])j=a[i-1]/a[i];
else j=t[i-1]/t[i];
a[i]*=j+1;
t[i]*=j+1;
}
}
cout<<a[n-1]+t[n-1]<<en... | a.cc: In function 'int main()':
a.cc:11:33: error: 'j' was not declared in this scope
11 | if(a[i-1]/a[i]>=t[i-1]/t[i])j=a[i-1]/a[i];
| ^
a.cc:12:10: error: 'j' was not declared in this scope
12 | else j=t[i-1]/t[i];
| ^
a.cc:13:11: error: 'j' was not d... |
s547655702 | 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[] t = new int[N];
int[] a = new int[N];
for(int i = 0; i < N; i++) {
t[i] = sc.nextInt();
a[i] = sc.nextInt();
}
// dp[i]はi回目までの投票数の最... | Main.java:17: error: ';' expected
long tnum = (dp[i - 1] / (long)(t[i - 1] + a[i - 1])) * t[i - 1]);
^
Main.java:18: error: ';' expected
long anum = (dp[i - 1] / (long)(t[i - 1] + a[i - 1])) * a[i - 1]);
... |
s516394455 | 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[] t = new int[N];
int[] a = new int[N];
for(int i = 0; i < N; i++) {
t[i] = sc.nextInt();
a[i] = sc.nextInt();
}
// dp[i]はi回目までの投票数の最... | Main.java:17: error: variable t is already defined in method main(String[])
long t = (dp[i - 1] * t[i - 1]) / (long)(t[i - 1] + a[i - 1]);
^
Main.java:17: error: array required, but long found
long t = (dp[i - 1] * t[i - 1]) / (long)(t[i - 1] + a[i - 1]);
^
Main.java:... |
s415675970 | p03964 | C++ | //#define _GRIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
// 基本テンプレート
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n... | a.cc:57:13: error: '::main' must return 'int'
57 | #define int ll
| ^~
a.cc:58:1: note: in expansion of macro 'int'
58 | int main()
| ^~~
|
s364466914 | p03964 | C++ | //ABC 049-C
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
#include <stdlib.h>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cstring>
#include <numeric>
#include <string>
#include <map>
#include <sstream>
using namespace std;
int main() {
int N, j = 1,
long long voteT[1001], vot... | a.cc: In function 'int main()':
a.cc:19:9: error: expected unqualified-id before 'long'
19 | long long voteT[1001], voteA[1001], T[1001], A[1001];
| ^~~~
a.cc:21:9: error: 'T' was not declared in this scope
21 | T[0] = 0;
| ^
a.cc:22:9: error: 'A' was not declared in th... |
s407988347 | p03964 | C++ | #include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
long long T[10000] = {}, A[10000] = {};
long long main(){
long long N;
cin >> N;
for (long long i = 0; i < N; i++) {
cin >> T[i] >> A[i];
}
long long T1 = T[0], T2 = A[0];
for ... | cc1plus: error: '::main' must return 'int'
|
s874558734 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
#include <cmath>
using namespace std;
u_int64_t ceilDiv(u_int64_t a, u_int64_t b)
{
return (a / b) + (a % b == 0 ? 0 : 1);
}
int main()
{
int N;
u_int64_t T = 1;
u_int64_t A = 1;
u_int64_t t;
u_int64_t a;
cin >> N;
for ... | a.cc: In function 'int main()':
a.cc:27:9: error: 'uint_64_t' was not declared in this scope; did you mean 'u_int64_t'?
27 | uint_64_t v = max(ceilDiv(T, t), ceilDiv(A, a));
| ^~~~~~~~~
| u_int64_t
a.cc:29:17: error: 'v' was not declared in this scope
29 | T = t * v;
... |
s032481115 | p03964 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
using namespace std;
int div(int a, int b)
{
return (a / b) + (a % b == 0 ? 0 : 1);
}
int main()
{
int N;
int A = 1;
int T = 1;
int a[1000];
int t[1000];
cin >> N;
for (int i = 0; i < N; i++)
{
cin >> a[i] >... | a.cc:7:5: error: ambiguating new declaration of 'int div(int, int)'
7 | int div(int a, int b)
| ^~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /usr/include/c++/14/bits/basic_string.h:4154,
... |
s416644106 | p03964 | C | #include <stdio.h>
int main() {
long long n, t[1001], a[1001];
scanf("%lld", &n);
for (int i=1;i<=n;i++) {
scanf("%lld %lld", &t[i], &a[i]);
}
long long ttotal=1, atotal=1;
for (int i=1;i<=n;i++) {
if (t[i] < a[i]) {
if(a[i] / t[i] > atotal / total){
while (ttotal % t[i] != 0) {
tto... | main.c: In function 'main':
main.c:12:43: error: 'total' undeclared (first use in this function); did you mean 'atotal'?
12 | if(a[i] / t[i] > atotal / total){
| ^~~~~
| atotal
main.c:12:43: note: each und... |
s088150879 | p03964 | C++ | #include <stdio.h>
int main(){
int n, t[1001], a[1001];
scanf("%d", &n);
for(int i=1;i<=n;i++){
scanf("%d %d", &t[i], &a[i]);
}
int ttotal=1, atotal=1;
for(int i=1;i<=n;i++){
if(t[i] < a[i]){
while(ttotal / atotal != t[i]/a[i]) {
ttotal++;
}
}
else if(t[i] > a[i]){
while(ttotal / atotal != t[i]/a[i]){
... | a.cc: In function 'int main()':
a.cc:26:17: error: expected '}' before 'else'
26 | else{
| ^~~~
a.cc:22:36: note: to match this '{'
22 | if(ttotal > atotal){
| ^
a.cc: At global scope:
a.cc:35:7: error: expected constru... |
s767905289 | p03964 | C++ | #include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
int main(){
int n;
ll t[100100];
ll a[100100];
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> t[i] >> a[i];
}
for (int i = 1; i < n; ++i)
{
ll tmp_t = t[i];
ll tmp_a = a[i];
if(t[i-1] > t[i] || a[i-1] > a[i]){
... | a.cc: In function 'int main()':
a.cc:27:40: error: expected ';' before 'a'
27 | t[i] *= tmp_mul
| ^
| ;
28 | a[i] *= tmp_mul
| ~
|
s208952323 | p03964 | C++ | #include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
int main(){
int n;
ll t[100100];
ll a[100100];
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> t[i] >> a[i];
}
for (int i = 1; i < n; ++i)
{
ll tmp_t = t[i];
ll tmp_a = a[i];
if(t[i-1] > t[i] || a[i-1] > a[i]){
... | a.cc: In function 'int main()':
a.cc:27:40: error: expected ';' before 'a'
27 | t[i] *= tmp_mul
| ^
| ;
28 | a[i] *= tmp_mul
| ~
|
s191924407 | p03964 | C++ | // Standard I/O
#include <iostream>
#include <sstream>
#include <cstdio>
// Standard Library
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
// Template Class
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
//... | a.cc: In function 'int main()':
a.cc:85:35: error: no matching function for call to 'max(ll, __gnu_cxx::__enable_if<true, double>::__type)'
85 | ll n = max((ans1+t)/t, ceil((ans2+a)/a));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/includ... |
s425009516 | p03964 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define INF (1e9+1)
//#define INF (1LL<<59)
#define int ll
int main(){
int n;
cin>>n;
ll l=0,r=0;
rep(i,n){
ll a,b;... | a.cc:11:13: error: '::main' must return 'int'
11 | #define int ll
| ^~
a.cc:13:1: note: in expansion of macro 'int'
13 | int main(){
| ^~~
a.cc: In function 'int main()':
a.cc:21:28: error: no matching function for call to 'max(int, ll)'
21 | int c = max( 1 , (int)max(ce... |
s144858718 | p03964 | C++ | #include<algorithm>
#include<string>
using namespace std;
#define loop(i,a,b) for(int i = a; i < b; i++)
#define rep(i,a) loop(i,0,a)
int main()
{
int n;
int t,k;
int tt,kk;
int a,b;
cin>>n;
cin>>a>>b;
rep(i,n-1){
cin>>tt>>kk;
t=tt;
k=kk;
while(1){
if(t>=a&&k>=b)
break;
t+=tt;
k+=kk;
... | a.cc: In function 'int main()':
a.cc:15:9: error: 'cin' was not declared in this scope
15 | cin>>n;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<string>
+++ |+#include <iostream>
3 | using nam... |
s638045878 | p03964 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line1 = b... | Main.java:36: error: ';' expected
System.out.println(PosA+PosB)
^
1 error
|
s604602126 | p03964 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line1 = b... | Main.java:22: error: cannot find symbol
String[] temp = lines.stlip(" ");
^
symbol: method stlip(String)
location: variable lines of type String
1 error
|
s182382240 | p03964 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.*;
import java.math.*;
public class Main {
public static void main(String args[] ) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line1 = b... | Main.java:22: error: cannot find symbol
String[] temp = lines.stlip(lines, " ");
^
symbol: method stlip(String,String)
location: variable lines of type String
Main.java:30: error: incompatible types: possible lossy conversion from double to long
mag = M... |
s107558346 | p03964 | 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>
... | a.cc: In function 'int main()':
a.cc:28:24: error: 'N' was not declared in this scope
28 | cin >> N;
| ^
a.cc:29:9: error: 'a' was not declared in this scope
29 | a = 1, b = 1;
| ^
a.cc:29:16: error: 'b' was not declared in this scope
29 | ... |
s558075274 | p03964 | 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>
... | a.cc: In function 'int main()':
a.cc:48:6: error: expected '}' at end of input
48 | }
| ^
a.cc:27:16: note: to match this '{'
27 | int main() {
| ^
|
s919317058 | p03964 | C++ | #include<iostream>
using namespace std;
long a, b, n, N, T, A;
long main() {
cin >> N;
a = 1, b = 1;
for (int i = 0; i < N; i++) {
cin >> T >> A;
n = max((a+T-1)/T,(b+A-1)/A);
a = T*n;
b = A*n;
}
cout << a+b << endl;
return 0;
} | cc1plus: error: '::main' must return 'int'
|
s119890045 | p03964 | C++ | #include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<cmath>
#include<climits>
#include<ctime>
#include<cstring>
#include<numeric>
#include <string>
using namespace std;
long a, b, n, N, T, A;
long main() {
cin >> N;
a = 1, b = 1;
for (int i = 0; i < N; i++) {
cin >> T >> A;
n = max((a+T... | cc1plus: error: '::main' must return 'int'
|
s477740347 | p03964 | C++ | #include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<cmath>
#include<climits>
#include<ctime>
#include<cstring>
#include<numeric>
#include <string>
using namespace std;
int N, T, A;
long a, b, n;
long main() {
cin >> N;
a = 1, b = 1;
for (int i = 0; i < N; i++) {
cin >> T >> A;
n = max(... | cc1plus: error: '::main' must return 'int'
|
s855378415 | p03964 | C++ | #inclulde <iostream>
#include <math.h>
int main(){
int reports, votes, votesT(1), votesA(1);
scanf("%d", &reports);
for(int i = 0; i < reports; i++){
int Ti, Ai;
scanf("%d %d", &Ti, &Ai);
int zoom_out;
if(ceil(static_cast<float>(votesT) / static_cast<float>(Ti)) >= ceil... | a.cc:1:2: error: invalid preprocessing directive #inclulde; did you mean #include?
1 | #inclulde <iostream>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
6 | scanf("%d", &reports);
| ^~~~~
a.cc:19:9: error: 'printf' was n... |
s374114299 | p03964 | C++ | #include <iostream>
#include <limits>
using namespace std;
int main()
{
int N;
cin >> N;
long long a = 0;
long long b = 0;
for (int i = 0; i < N; ++i) {
int T, A;
cin >> T >> A;
if (a == 0 && b == 0) {
a = T;
b = A;
}
else {
long long l = 1;
long long u = LLONG_MAX - 1;
while (l < u) {
... | a.cc: In function 'int main()':
a.cc:21:39: error: 'LLONG_MAX' was not declared in this scope
21 | long long u = LLONG_MAX - 1;
| ^~~~~~~~~
a.cc:3:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <c... |
s509187983 | p03964 | C++ | 5
3 10
48 17
31 199
231 23
3 2 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5
| ^
|
s214133737 | p03964 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int nTimes, votesA, votesB, r1, r2, ans, lol;
int main() {
scanf("%d", &nTimes);
scanf("%d %d", &votesA, &votesB);
for (int i = 0; i < nTimes - 1; i++) {
// printf("CURRENT VOTES A = %d\n", votesA);
// printf("CURRENT VOTES B = %d\n", votesB);
scan... | a.cc: In function 'int main()':
a.cc:31:60: error: 'floor' was not declared in this scope
31 | int test = floor(votesB / r2);
| ^~~~~
a.cc:45:52: error: 'floor' was not declared in this scope
45 | ... |
s156054779 | p03964 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include<cmath>
using namespace std;
int main() {
int N; cin >> N;
int t, a; cin >> t >> a;
long long int nt = t, na = a;
for (int i = 1; i < N; i++) {
int t, a; cin >> t >> a;
//long long i... | a.cc: In function 'int main()':
a.cc:17:36: error: expected primary-expression before 'long'
17 | long long int p = max(ceil(long long double)nt/t), ceil((long long double)na/a));
| ^~~~
|
s673228932 | p03964 | C++ | #include <stdio.h>
#include <string>
#include <iostream>
using namespace std;
int main(){
char keyin[20];
int N;
int cnt = 0;
int l=0, r=0;
fgets(keyin, sizeof(keyin), stdin);
N = atoi( strtok(keyin, " ") );
for(int i=0; i<N; i++){
fgets(keyin, sizeof(keyin), stdin);
int t_l = atoi( strtok(keyin... | a.cc: In function 'int main()':
a.cc:13:13: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
13 | N = atoi( strtok(keyin, " ") );
| ^~~~~~
| strtoq
|
s756981366 | p03964 | C++ | #include <iostream>
using namespace std;
int main() {
int N, T, A;
cin >> N;
int t = 1;
int a = 1;
for (int i = 0; i != N; ++i)
{
cin >> T >> A;
if (t / T * A == a)
{
continue;
}
if (T >= t && A >= a)
{... | a.cc: In function 'int main()':
a.cc:31:9: error: expected primary-expression before '}' token
31 | }
| ^
|
s778824339 | p03964 | C | #include<stdio.h>
#include<math.h>
int main(void){
int N,K,i,j,t,a;
int T[1000];
int A[1000];
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%d",&T[i]);
}
for(i=0;i<N;i++){
scanf("%d",&A[i]);
}
for(i=0;i<N;i++){
if(i==0){
t=T[0];
a=A[0];
}
else{
while(a*T[i]/(T[i]+A[i])==t*A[i]/(A[i]+T[i]... | main.c: In function 'main':
main.c:55:1: error: expected declaration or statement at end of input
55 | }
| ^
|
s330130801 | p03964 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
int i,N;
int a,b;
int lva, lvb;
int temp;
int old_a=1, old_b=1;
double pa, pb;
scanf("%d", &N);
for(i=0; i<N; i++){
scanf("%d %d", &a, &b);
// temp = 1;
// while( old_a > a*temp || old_b > b*temp){
// temp++;
// }
pa = (double)old... | main.c: In function 'main':
main.c:25:24: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
25 | temp = max(pa, pb);
| ^~~
| fmax
|
s725998010 | p03964 | C | #include<stdio.h>
#include<math.h>
int main(void){
int N,K,i,j,t,a;
int T[];
int A[];
scanf("%d",&N);
for(i=0,i<N;i++){
scanf("%d",T[i]);
}
for(i=0,i<N;i++){
scanf("%d",A[i]);
}
for(i=0;i<N;i++){
if(i==0){
t=T[0];
a=A[0];
}
else{
while(a*T[i]/(T[i]+A[i])==t*A[i]/(A[i]+T[i])){
if... | main.c: In function 'main':
main.c:7:13: error: array size missing in 'T'
7 | int T[];
| ^
main.c:8:13: error: array size missing in 'A'
8 | int A[];
| ^
main.c:12:24: error: expected ';' before ')' token
12 | for(i=0,i<N;i++){
| ... |
s620660866 | p03964 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
using namespace std;
#define debug(x) cout<<#x<<": "<<x<<endl
#define rep(i,a,b) for(int i=a;i<b;i++)
#define PB push_back
#define putn(x,n) cout<< fixed<< setprecision(n)<< x << endl;
typedef long long ll;
int main(){
cin.ti... | a.cc: In function 'int main()':
a.cc:35:17: error: 'else' without a previous 'if'
35 | else{
| ^~~~
a.cc: At global scope:
a.cc:45:9: error: 'cout' does not name a type
45 | cout << (sa + st) << endl;
| ^~~~
a.cc:48:9: error: expected unqualified-id befo... |
s205198807 | p03964 | C++ | #include<stdio.h>
long long int a[1100],b[1100],t[1100]={1,};
int f(float c){
if((c-(int)c)>0)
return ((int)c+1;
else
return (int)c;
}
int main(){
int i,n,e;
float c,d;
long long int result;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%lld %lld",&a[i],&b[i]);
if(i!=0){
c = (float)a[i-1]/(float)a[i];
... | a.cc: In function 'int f(float)':
a.cc:5:33: error: expected ')' before ';' token
5 | return ((int)c+1;
| ~ ^
| )
|
s101359245 | p03964 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long t[] = new int[n];
long a[] = new int[n];
for (int i = 0; i < n; i++) {
t[i] = sc.nextInt();
a[i] = sc.nextInt();
}
for (int i = 1; i < n; i++) {
... | Main.java:7: error: incompatible types: int[] cannot be converted to long[]
long t[] = new int[n];
^
Main.java:8: error: incompatible types: int[] cannot be converted to long[]
long a[] = new int[n];
^
2 errors
|
s234358901 | p03964 | C++ | #include<iostream>
using namespace std;
int main() {
__int64 n, i, t, a, x, y,X,Y,g,h;
cin >> n;
x = 1;
y = 1;
for (i = 0; i < n; i++) {
cin >> t >> a;
for (X = 0; g != h; X++) {
g = (x + X)*a;
for (Y = 0; g != h; Y++) {
h = (y + Y)*t;
if (Y > 100000000000000000) {
break;
}
}
}
}
... | a.cc: In function 'int main()':
a.cc:4:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
4 | __int64 n, i, t, a, x, y,X,Y,g,h;
| ^~~~~~~
| __int64_t
a.cc:5:16: error: 'n' was not declared in this scope
5 | cin >> n;
| ^... |
s789665030 | p03964 | C++ | #include<stdio.h>
long long int a[1100],b[1100],t[1100]={1,};
int f(float c){
if((c-(int)c)>0)
return (int)c+1;
else
(int)c;
}
int main(){
int i,,n,e;
float c,d;
long long int result;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
if(i!=0){
c = (float)a[i-1]/(float)a[i];
d = (... | a.cc: In function 'int main()':
a.cc:11:15: error: expected unqualified-id before ',' token
11 | int i,,n,e;
| ^
a.cc: In function 'int f(float)':
a.cc:8:1: warning: control reaches end of non-void function [-Wreturn-type]
8 | }
| ^
|
s997467752 | p03964 | Java | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long takahashi = 1, aoki = 1;
for(int i=0; i<n; i++){
int t = sc.nextInt();
int a = sc.nextInt();
int tmp1 = takahashi/t, tmp2 = aoki/a;
tmp1 += (takah... | Main.java:12: error: incompatible types: possible lossy conversion from long to int
int tmp1 = takahashi/t, tmp2 = aoki/a;
^
Main.java:12: error: incompatible types: possible lossy conversion from long to int
int tmp1 = takahashi/t, tmp2 = aoki/a;
^
2 e... |
s069199583 | p03964 | C | #include <stdio.h>
int N, T[1234], A[1234];
int tmp = 1, ans[2] = { 0 };
int main(void) {
scanf("%d", &N);
for (int i = 0; i < N; ++i) { scanf("%d%d", &T[i], &A[i]); }
for (int i = 0; i < N; ++i) {
if (i == 0) {
ans[0] += T[i];
ans[1] += A[i];
}
else {
while (true) {
if (ans[0] <= T[i] * tmp&&an... | main.c: In function 'main':
main.c:15:32: error: 'true' undeclared (first use in this function)
15 | while (true) {
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #inclu... |
s060809615 | p03964 | C++ | #include<iostream>
using namespace std;
using ll=long long;
ll n,a[2000],b[2000],ans,x,y;
int i;
int main(){
cin>>n;
while(i<n)cin>>a[i]>>b[i],++i;
x=y=1;i=0;
while(i<n){
ll r=max((x+a[i]-1)/a[i],y+b[i]-1)/b[i]));
x=a[i]*r,y=b[i]*r;
}ans=x+y;
cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:40: error: expected ',' or ';' before ')' token
12 | ll r=max((x+a[i]-1)/a[i],y+b[i]-1)/b[i]));
| ^
|
s093690181 | p03965 | Java | import java.util.Scanner;
import java.lang.String;
public class TestMain {
public static void main (String[] arg) {
Scanner sc = new Scanner(System.in);
String tcdSequence = sc.next();
sc.close();
int tdcLength = tcdSequence.length();
char[] acdSequence = new char[tdcLength];
for (int i = 0; ... | Main.java:4: error: class TestMain is public, should be declared in a file named TestMain.java
public class TestMain {
^
1 error
|
s012688517 | p03965 | Java | import java.util.Scanner;
import java.lang.String;
public class TestMain {
public static void main (String[] arg) {
Scanner sc = new Scanner(System.in);
rockpaper(sc);
sc.close();
}
public static void rockpaper(Scanner sc) {
String tcdSequence = sc.next();
char[] acdSequence = new char[... | Main.java:4: error: class TestMain is public, should be declared in a file named TestMain.java
public class TestMain {
^
1 error
|
s914154987 | p03965 | Java | import java.util.Scanner;
import java.lang.String;
public class TestMain {
public static void main (String[] arg) {
Scanner sc = new Scanner(System.in);
rockpaper(sc);
sc.close();
}
public static void rockpaper(Scanner sc) {
String tcdSequence = sc.next();
char[] acdSequence = new char[tcdS... | Main.java:4: error: class TestMain is public, should be declared in a file named TestMain.java
public class TestMain {
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.