submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s156939132 | p00532 | C++ | #include<bits/stdc++>
using namespace std;
int main(){
int player,rounds,i,j,k;
cin>>player>>rounds;
int target[rounds],forecast[player],sum[player];
for(i=0;i<player;i++)sum[i]=0;
for(i=0;i<rounds;i++)cin>>target[i];
for(i=0;i<rounds;i++){
for(k=0;k<player;k++)cin>>forecast[k];
for(j=0;j<player;j++){
if(target[i]==forecast[j])sum[j]++;else sum[target[i]-1]++;
}
}
for(i=0;i<player;i++)cout<<sum[i]<<endl;
return 0;
} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s926479778 | p00532 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
vector<int> t;
std::vector<int> tmp;
for (int i = 0; i <= m; i++) {
int tmp;
cin >> tmp;
t. push_back(tmp);
}
vector<int>p(n, 0);
for (int i = 0; i < n; i++){
cout << p[i] << endl;
} | a.cc: In function 'int main()':
a.cc:25:10: error: expected '}' at end of input
25 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s500584377 | p00532 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
vector<int> t;
std::vector<int> tmp;
for (int i = 0; i <= m; i++) {
int tmp;
cin >> tmp;
t. push_back(tmp);
}
vector<int>p(n, 0);
for (int i = 0; i < n; i++){
cout << p[i] << endl;
} | a.cc: In function 'int main()':
a.cc:25:10: error: expected '}' at end of input
25 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s979219165 | p00532 | C++ |
#include <iostream>
using namespace std;
int main()
{
int N, M, i, j;
int target[100], cnt[100], data[100][100];
cin >> N; cin >> M;
for (i = 0; i < M; i++)
{
cin >> &target[i];
--target[i];
}
for (i = 0; i < M; i++)
{
for (j = 0; j < N; j++)
{
cin >> &data[i][j];
--data[i][j];
cnt[j] = 0;
}
}
for (j = 0; j < N; j++)
{
for (i = 0; i < M; i++)
{
if (data[i][j] == target[i])
{
++cnt[j];
}
else
{
++cnt[target[i]];
}
}
}
for (j = 0; j < N; j++)
{
cout << cnt[j];
}
} | a.cc: In function 'int main()':
a.cc:13:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int*')
13 | cin >> &target[i];
| ~~~ ^~ ~~~~~~~~~~
| | |
| | int*
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:2:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
13 | cin >> &target[i];
| ^~~~~~~~~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(short int)(& target[i])' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(short unsigned int)(& target[i])' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(int)(& target[i])' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(unsigned int)(& target[i])' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(long int)(& target[i])' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(long unsigned int)(& target[i])' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(long long int)(& target[i])' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
13 | cin >> &target[i];
| ^~~~~~~~~~
| |
| int*
a.cc:13:24: error: cannot bind rvalue '(long long unsigned int)(& target[i])' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:13:24: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
13 | cin >> &target[i];
| ^~~~~~~~~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int*' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int*' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int*' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int*' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type |
s586813909 | p00532 | C++ | #include<iostream>
using namespace std;
int main(){
int n,m,reason;
cin >> n >> m;
int tag[m],table[n];
for(int i=0; i<m; i++)[
cin >> tag[i];
}
for(int i=0; i<m; i++){
for(int j=0; j<n; j++){
cin >> reason;
if(reason == tag[i]){
table[j]++;
}
else{
table[tag[i]];
}
}
}
for(int i=0; i<n; i++){
cout << table[i] << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:5: warning: capture of variable 'std::cin' with non-automatic storage duration
13 | cin >> tag[i];
| ^~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::istream std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:13:8: error: expected ',' before '>>' token
13 | cin >> tag[i];
| ^~~
| ,
a.cc:13:9: error: expected identifier before '>>' token
13 | cin >> tag[i];
| ^~
a.cc:13:18: error: expected ']' before ';' token
13 | cin >> tag[i];
| ^
| ]
a.cc: In lambda function:
a.cc:13:18: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:16:3: error: expected unqualified-id before 'for'
16 | for(int i=0; i<m; i++){
| ^~~
a.cc:16:16: error: 'i' does not name a type
16 | for(int i=0; i<m; i++){
| ^
a.cc:16:21: error: 'i' does not name a type
16 | for(int i=0; i<m; i++){
| ^
a.cc:28:2: error: expected unqualified-id before 'for'
28 | for(int i=0; i<n; i++){
| ^~~
a.cc:28:15: error: 'i' does not name a type
28 | for(int i=0; i<n; i++){
| ^
a.cc:28:20: error: 'i' does not name a type
28 | for(int i=0; i<n; i++){
| ^
a.cc:32:2: error: expected unqualified-id before 'return'
32 | return 0;
| ^~~~~~
a.cc:34:1: error: expected declaration before '}' token
34 | }
| ^
|
s870428214 | p00532 | C++ | #include<iostream>
using namespace std;
int i, N, M;
int A[101], B[101][101], P[101];
int main(){
cin >> N >> M;
for (i=1; i<=M; i++) { cin >> A[i]; }
for (i=1; i<=M; i++) {
for (j=1; j<=N; j++) {
cin >> B[i][j];
}
}
for (j=1; j<=N; j++) { p[j] = 0; }
for (i=1; i<=M; i++) {
for (j=1; j<=N; j++) {
if(A[i]==B[i][j]) {
P[j]++;
} else {
P[A[i]]++;
}
}
}
for (j=1; j<=N; j++) {
cout << P[j] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:14: error: 'j' was not declared in this scope
9 | for (j=1; j<=N; j++) {
| ^
a.cc:13:10: error: 'j' was not declared in this scope
13 | for (j=1; j<=N; j++) { p[j] = 0; }
| ^
a.cc:13:28: error: 'p' was not declared in this scope
13 | for (j=1; j<=N; j++) { p[j] = 0; }
| ^
a.cc:15:14: error: 'j' was not declared in this scope
15 | for (j=1; j<=N; j++) {
| ^
a.cc:23:9: error: 'j' was not declared in this scope
23 | for (j=1; j<=N; j++) {
| ^
|
s351625564 | p00532 | C++ | #include<iostream>
using namespace std;
int i, j, N, M;
int A[101], B[101][101], P[101];
int main(){
cin >> N >> M;
for (i=1; i<=M; i++) { cin >> A[i]; }
for (i=1; i<=M; i++) {
for (j=1; j<=N; j++) {
cin >> B[i][j];
}
}
for (j=1; j<=N; j++) { p[j] = 0; }
for (i=1; i<=M; i++) {
for (j=1; j<=N; j++) {
if(A[i]==B[i][j]) {
P[j]++;
} else {
P[A[i]]++;
}
}
}
for (j=1; j<=N; j++) {
cout << P[j] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:28: error: 'p' was not declared in this scope
13 | for (j=1; j<=N; j++) { p[j] = 0; }
| ^
|
s390453310 | p00533 | Java | import java.io.*;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
StringTokenizer st=new StringTokenizer(line);
int h=Integer.parseInt(st.netToken());
int w=Integer.parseInt(st.netToken());
int[][] wf=new int[h][w];
for(int i=0;i<h;i++){
boolean flag=false;
char[] map=br.readLine().toCharArray();
for(int j=0;j<w;j++){
if(map[j]=='c'){
wf[i][j]=0;
flag=true;
}
else{
if(!flag) wf[i][j]=-1;
else wf[i][j]=wf[i][j-1]+1;
}
if(j==w-1) out.println(wf[i][j]);
else out.print(wf[i][j]+" ");
}
}
out.flush();
}
}
} | Main.java:13: error: cannot find symbol
int h=Integer.parseInt(st.netToken());
^
symbol: method netToken()
location: variable st of type StringTokenizer
Main.java:14: error: cannot find symbol
int w=Integer.parseInt(st.netToken());
^
symbol: method netToken()
location: variable st of type StringTokenizer
2 errors
|
s060961441 | p00533 | Java | import java.util.Scanner;
public class weatherforecast {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int cnt=0;
int ccnt=0;
String data[][] = new String[H][W];
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
data[i][k] = sc.next();
}
}
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
if(data[i][k].equals(".")){
if(ccnt != 1){
if((k+1)==W){
System.out.println(-1);
ccnt = 0;
cnt = 0;
}else{
System.out.print(-1);
}
}else{
if((k+1)==W){
cnt++;
System.out.println(cnt);
ccnt = 0;
cnt = 0;
}else{
cnt++;
System.out.print(cnt);
}
}
}
// System.out.print(cnt);
else if(data[i][k].equals("c")){
//cnt++;
ccnt = 1;
if((k+1)==W){
System.out.println(0);
ccnt = 0;
cnt = 0;
} else {
System.out.print(0);
}
}
}
}
}
} | Main.java:3: error: class weatherforecast is public, should be declared in a file named weatherforecast.java
public class weatherforecast {
^
1 error
|
s937586247 | p00533 | Java | import java.util.Scanner;
public class weatherforecast {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int cnt=0;
int ccnt=0;
String data[][] = new String[H][W];
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
data[i][k] = sc.next();
}
}
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
if(data[i][k].equals(".")){
if(ccnt != 1){
if((k+1)==W){
System.out.println(-1);
ccnt = 0;
cnt = 0;
}else{
System.out.print(-1);
}
}else{
if((k+1)==W){
cnt++;
System.out.println(cnt);
ccnt = 0;
cnt = 0;
}else{
cnt++;
System.out.print(cnt);
}
}
}
else if(data[i][k].equals("c")){
cnt = 0;
ccnt = 1;
if((k+1)==W){
System.out.println(0);
ccnt = 0;
} else {
System.out.print(0);
}
}
}
}
}
} | Main.java:3: error: class weatherforecast is public, should be declared in a file named weatherforecast.java
public class weatherforecast {
^
1 error
|
s134707292 | p00533 | Java | import java.util.Scanner;
public class weatherforecast {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int cnt=0;
int ccnt=0;
String data[][] = new String[H][W];
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
data[i][k] = sc.next();
}
}
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
if(data[i][k].equals(".")){
if(ccnt != 1){
if((k+1)==W){
System.out.println(-1);
ccnt = 0;
cnt = 0;
}else System.out.print(-1 );
}else{
if((k+1)==W){
cnt++;
System.out.println(cnt);
ccnt = 0;
cnt = 0;
}else{
cnt++;
System.out.print(cnt );
}
}
}
else if(data[i][k].equals("c")){
cnt = 0;
ccnt = 1;
if((k+1)==W){
System.out.println(0 );
ccnt = 0;
}else System.out.print(0 );
}
}
}
}
} | Main.java:2: error: class weatherforecast is public, should be declared in a file named weatherforecast.java
public class weatherforecast {
^
1 error
|
s321541592 | p00533 | Java | import java.util.Scanner;
public class weatherforecast {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int cnt=0;
int ccnt=0;
String data[][] = new String[H][W];
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
data[i][k] = sc.next();
}
}
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
if(data[i][k].equals(".")){
if(ccnt != 1){
if((k+1)==W){
System.out.println(-1);
//System.out.print(" ");
ccnt = 0;
cnt = 0;
}else {
System.out.print(-1);
System.out.print(" ");
}
}else{
if((k+1)==W){
cnt++;
System.out.println(cnt);
ccnt = 0;
cnt = 0;
}else{
cnt++;
System.out.print(cnt);
System.out.print(" ");
}
}
}
else if(data[i][k].equals("c")){
cnt = 0;
ccnt = 1;
if((k+1)==W){
System.out.println(0);
// System.out.println(" ");
ccnt = 0;
}else {
System.out.print(0);
System.out.print(" ");
}
}
}
}
}
} | Main.java:2: error: class weatherforecast is public, should be declared in a file named weatherforecast.java
public class weatherforecast {
^
1 error
|
s987112070 | p00533 | Java | import java.util.Scanner;
public class main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int cnt=0;
int ccnt=0;
String data[][] = new String[H][W];
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
data[i][k] = sc.next();
}
}
for(int i = 0;i < H;i++){
for(int k = 0;k < W;k++){
if(data[i][k].equals(".")){
if(ccnt != 1){
if((k+1)==W){
System.out.println(-1);
//System.out.print(" ");
ccnt = 0;
cnt = 0;
}else {
System.out.print(-1);
System.out.print(" ");
}
}else{
if((k+1)==W){
cnt++;
System.out.println(cnt);
ccnt = 0;
cnt = 0;
}else{
cnt++;
System.out.print(cnt);
System.out.print(" ");
}
}
}
else if(data[i][k].equals("c")){
cnt = 0;
ccnt = 1;
if((k+1)==W){
System.out.println(0);
// System.out.println(" ");
ccnt = 0;
}else {
System.out.print(0);
System.out.print(" ");
}
}
}
}
}
} | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s599432860 | p00533 | Java | package second;
import java.util.Scanner;
public class WeatherForecaster {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
int ans[][] = new int[1000][1000]; //????°?????????????????????\?????????????????????
//??\?????????????¨????
int time;
for(int i = 0; i < h; i++){
char[] hw = sc.next().toCharArray();
time = -1;//1???????????£???????????????????????????
for(int j = 0; j < w; j++){
if(hw[j] == 'c'){ //??????????°????????????????????????´???????????????0????????????
time = 0;
}
ans[i][j] = time;
if(time != -1){ //?????????????°?????????\??????????????????1???????¶????????????????
time++;
}
}
}
//??????
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
if(j == w - 1){
System.out.println(ans[i][j]);
}else{
System.out.print(ans[i][j]);
System.out.print(" ");
}
}
}
}
} | Main.java:4: error: class WeatherForecaster is public, should be declared in a file named WeatherForecaster.java
public class WeatherForecaster {
^
1 error
|
s594409074 | p00533 | Java | import java.util.Scanner;
public class SDAOJ_610 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
char[] kumo = new char[W];
int[][] ans = new int [H][W];
int count = 0;
int no = 0;
for(int k = 0; k < H; k++){
kumo = sc.next().toCharArray();
for(int j = 0; j < W; j++){
for(int l = j; l >= 0; l--){
if(kumo[l] == 'c'){
ans[k][j] = count;
no = 1;
// System.out.println("target");
break;
}else if(kumo[l] == '.'){
count = count + 1;
// System.out.println("suru-");
}
}
if(no == 0){
ans[k][j] = -1;
// System.out.println("no");
}
count = 0;
no = 0;
}
}
for(int i = 0; i < H; i++){
for(int k = 0; k < W; k++){
System.out.print(ans[i][k]);
}
System.out.println("");
}
}
} | Main.java:3: error: class SDAOJ_610 is public, should be declared in a file named SDAOJ_610.java
public class SDAOJ_610 {
^
1 error
|
s730095302 | p00533 | Java | import java.util.Scanner;
public class main {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
int[][] section = new int[h][w];
for (int i = 0; i < h; i++){
char [] wether = sc.next().toCharArray();
int count = 0;
for(int j = 0; j < w; j++){
if(wether[j] == 'c'){
count = 0;
}else if(wether[j] == '.'){
count = -1;
}else if(count >= 0){
count++;
section[i][j] = count;
}
for ( i = 0; i < h; i++){
for( j = 0; j < w; j++){
if(j != w-1){
System.out.print(section[i][j]+"");
}else{
System.out.print(section[i][j]);
}
}
}
}
}
}
} | Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s496085982 | p00533 | Java | public class main {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
int[][] section = new int[h][w];
for (int i = 0; i < h; i++){
char [] wether = sc.next().toCharArray();
int count = 0;
for(int j = 0; j < w; j++){
if(wether[j] == 'c'){
count = 0;
}else if(wether[j] == '.'){
count = -1;
}
if(count >= 0){
count++;
section[i][j] = count;
}
for ( i = 0; i < h; i++){
for( j = 0; j < w; j++){
if(j != w-1){
System.out.print(section[i][j]+"");
}else{
System.out.print(section[i][j]);
}
}
}
}
}
}
} | Main.java:1: error: class main is public, should be declared in a file named main.java
public class main {
^
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
3 errors
|
s949746814 | p00533 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int[][] A;
A = new int[H][W];
for(int i=0; i<H; i++){
char[] JOI = sc.next().toCharArray();
int time = -1;
for(int j=0; j<W; j++){
if(JOI[j] == 'c') time = 0;
A[i][j] = time;
if(time>-1) time++;
}
}
for(int i=0; i<H; i++){
for(int j=0; j<W; j++){
System.out.print(A[i][j]);
if(j<W-1) System.out.print(" ");
else System.out.println();
}
}
} | Main.java:28: error: reached end of file while parsing
}
^
1 error
|
s547946637 | p00533 | Java |
import java.util.Scanner;
public class mapcloud{
public void draw(int h,int w){
char[] c = new char[w];
int[][] map= new int[h][w];
int t = 0;
for(int i = 0; i < h; i++){
t = -1;
for(int j = 0; j < w ; j++){
if(c[j] == 'c') t = 0;
map[i][j] = t;
if(t != -1) t++;
}
}
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
if( j == w-1) System.out.println(map[i][j]);
else{
System.out.print(map[i][j]+" ");
}
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
mapcloud(h,w);
}
}
} | Main.java:26: error: illegal start of expression
public static void main(String[] args) {
^
Main.java:33: error: class, interface, enum, or record expected
}
^
2 errors
|
s240155945 | p00533 | Java |
import java.util.Scanner;
public class mapcloud{
public int w;
public int h;
public char[] c = new char[w];
int t = 0;
void draw(int h,int w){
int[][] map= new int[h][w];
for(int i = 0; i < h; i++){
t = -1;
for(int j = 0; j < w ; j++){
if(c[j] == 'c') t = 0;
map[i][j] = t;
if(t != -1) t++;
}
}
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
if( j == w-1) System.out.println(map[i][j]);
else{
System.out.print(map[i][j]+" ");
}
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
mapcloud(h,w);
}
}
} | Main.java:29: error: illegal start of expression
public static void main(String[] args) {
^
Main.java:36: error: class, interface, enum, or record expected
}
^
2 errors
|
s349077188 | p00533 | Java |
import java.util.Scanner;
public class Main{
public int w;
public int h;
public char[] c = new char[w];
int t = 0;
void doIt(int h,int w){
int[][] map= new int[h][w];
for(int i = 0; i < h; i++){
t = -1;
for(int j = 0; j < w ; j++){
if(c[j] == 'c') t = 0;
map[i][j] = t;
if(t != -1) t++;
}
}
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
if( j == w-1) System.out.println(map[i][j]);
else{
System.out.print(map[i][j]+" ");
}
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
doIt(h,w);
}
}
} | Main.java:29: error: illegal start of expression
public static void main(String[] args) {
^
Main.java:36: error: class, interface, enum, or record expected
}
^
2 errors
|
s836357086 | p00533 | Java |
import java.util.Scanner;
public int w;
public int h;
public class Main{
public int w;
public int h;
public char[] c = new char[w];
int t = 0;
void doIt(int h,int w){
int[][] map= new int[h][w];
for(int i = 0; i < h; i++){
t = -1;
for(int j = 0; j < w ; j++){
if(c[j] == 'c') t = 0;
map[i][j] = t;
if(t != -1) t++;
}
}
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
if( j == w-1) System.out.println(map[i][j]);
else{
System.out.print(map[i][j]+" ");
}
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt();
int w = sc.nextInt();
doIt(h,w);
}
} | Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public int w;
^
(use --enable-preview to enable unnamed classes)
Main.java:30: error: illegal start of expression
public static void main(String[] args) {
^
2 errors
|
s383980637 | p00533 | C | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;} | main.c:1:1: warning: data definition has no type or storage class
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'k' defaults to 'int' [-Wimplicit-int]
main.c:1:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
main.c:1:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^~~~~
main.c:1:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:45: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^~~~~~~
main.c:1:45: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:1:44: error: lvalue required as left operand of assignment
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^
main.c:1:55: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | j;main(k){scanf("%d%d\n",&k,&j);for(k=-1;~j=getchar();printf(j-10?" ":""))printf(j-10?"%d":"\n",k=j-10?j-99?k<0?-1:k+1:0:-1);return 0;}
| ^~~~~~
main.c:1:55: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:55: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:55: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s370661576 | p00533 | C | include <iostream>
using namespace std;
int main (){
char ny;
int dr[101][101],h,w,c=0,i;
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>ny;
dr[s][s_]=-1;
if (ny=='c')dr[s][s_]=0;
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]==0){
i=s_;
for (int s__=i;s__<w;s__++){
if (dr[s][s__]==0)c=0;
if (dr[s][s__]==-1){
c++;
dr[s][s__]=c;
}
}
c=0;
}
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<dr[s][s_];
}
else {
cout<<dr[s][s_]<<" ";
}
}
cout<<endl;
}
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <iostream>
| ^
main.c: In function 'main':
main.c:6:1: error: 'cin' undeclared (first use in this function)
6 | cin>>h>>w;
| ^~~
main.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:33:17: error: 'cout' undeclared (first use in this function)
33 | cout<<dr[s][s_];
| ^~~~
main.c:39:7: error: 'endl' undeclared (first use in this function)
39 | cout<<endl;
| ^~~~
|
s802342564 | p00533 | C | #include <stdio.h>
int main(void)
{
int h,w,i,j,e,b;
char a[100][100];
scanf("%d %d",&h,&w);
for(i=0;i<h;i++){
scanf("%s",&a[i]);
}
for(i=0;i<h;i++){
for(j=0;j<w;j++){
if(a[i][j]=='c'){
a[i][j]=0;
}
else if(a[i][j]=='.' && j==0){
a[i][j]=-1;
}
else if(a[i][j]=='.'){
b=j;
g:
if(a[i][b]=='c'){
a[i][j]=b-j;
b=0;
}
else if(b==0){
a[i][j]=-1;
}
else if(a[i][j]!='c' && b!=0){
b-;
goto g;
}
}
printf("%d ",a[i][j]);
}
printf("\n");
}
return 0;
}
| main.c: In function 'main':
main.c:30:51: error: expected expression before ';' token
30 | b-;
| ^
|
s368609091 | p00533 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void)
{
int H=0,W=0,a=0,c=0,d=0;
cin>>H>>W;
char d=0;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>d;
if(d=='.'&&c==0){cout<<"-1";}
else(d=='c'){cout<<"0";c=1;a=0;}
else(d=='.'){a++;cout<<a;}
if(j==W-1){cout<<endl;}
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: conflicting declaration 'char d'
9 | char d=0;
| ^
a.cc:7:29: note: previous declaration as 'int d'
7 | int H=0,W=0,a=0,c=0,d=0;
| ^
a.cc:14:37: error: expected ';' before '{' token
14 | else(d=='c'){cout<<"0";c=1;a=0;}
| ^
| ;
a.cc:15:25: error: 'else' without a previous 'if'
15 | else(d=='.'){a++;cout<<a;}
| ^~~~
a.cc:15:37: error: expected ';' before '{' token
15 | else(d=='.'){a++;cout<<a;}
| ^
| ;
|
s552321776 | p00533 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void)
{
int H=0,W=0,a=0,c=0,d=0;
cin>>H>>W;
char d=0;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>d;
if(d=='.'&&c==0){cout<<"-1";}
else if(d=='c'){cout<<"0";c=1;a=0;}
else if(d=='.'){a++;cout<<a;}
if(j==W-1){cout<<endl;}
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: conflicting declaration 'char d'
9 | char d=0;
| ^
a.cc:7:29: note: previous declaration as 'int d'
7 | int H=0,W=0,a=0,c=0,d=0;
| ^
|
s321971010 | p00533 | C++ | #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void)
{
int H=0,W=0,a=0,c=0;
cin>>H>>W;
char d=0;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>d;
if(d=='.'&&c==0){cout<<"-1";}
else if(d=='c'){cout<<"0";c=1;a=0;}
else if(d=='.'){a++;cout<<a;}
if(j==W-1){cout<<endl;c=0;a=0;}
else{cout<<" "}
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:17:39: error: expected ';' before '}' token
17 | else{cout<<" "}
| ^
| ;
|
s729345021 | p00533 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int h,w;
cin >> h >> w;
char a[h][w];
int b[h][w];
for(int i=0;i<h;i++)
for(int j=0;j<w;j++)
cin >> a[i][j];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
int d=0;
for(int k=j;k>=0;k--){
if(a[i][k]=='c'){
b[i][j]=j-k;
d++;
break;
}
}
if(d==0) b[i][j]=-1;
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w-1;j++)
cout << a[i][j] << " ";
cout << a[i][j] << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:31:18: error: 'j' was not declared in this scope
31 | cout << a[i][j] << endl;
| ^
|
s312192413 | p00533 | C++ | #include <bits/stdc++.h>
using namespace std;
#define for_(i,a,b) for(int i=(a);i<(b);++i)
int main() {
int H, W;
cin >> H >> W;
vector< string > grid(H);
for_(i,0,H) cin >> grid[i];
for_(y,0,H) {
for_(x,0,W) {
int xx = x;
while (xx >= 0 && grid[y][xx] == '.') --xx;
cout << (xx >= 0 ? x - xx : -1) << (x < W - 1 ? " " : "\n");c
}
}
} | a.cc: In function 'int main()':
a.cc:17:85: error: 'c' was not declared in this scope
17 | cout << (xx >= 0 ? x - xx : -1) << (x < W - 1 ? " " : "\n");c
| ^
|
s970187138 | p00533 | C++ | #include <iostream>
using namespace std;
int main() {
int n,m;
int ans[100][100];
char a[100][100];
for(int i = 0;i<100;i++){
for(int j = 0;j<100;j++){
ans[i][j]=101;
}
}
cin >> n >> m;
for(int i = 0;i<n;i++){
for(int j=0;j<m;j++){
cin >> a[i][j];
}
}
for(int i =0;i<n;i++){
for(int j = m-1;j>=0;j--){
if(a[i][j]=='c'){
int p=0;
for(int k=j;k<m;k++){
if(ans[i][k]>p){
ans[i][k]=p;
}
p++;
}
}
}
}
for(int i = 0;i<100;i++){
for(int j = 0;j<100;j++){
if(ans[i][j]==101;){ans[i][j]=-1;}
}
}
for(int i =0;i<n;i++){
for(int j =0;j<m;j++){
if(j == 0){
cout << ans[i][j];
}
else if(j == m-1){
cout << ' ' << ans[i][j] << endl;
}
else{cout << ' '<< ans[i][j];}
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:34:43: error: expected primary-expression before ')' token
34 | if(ans[i][j]==101;){ans[i][j]=-1;}
| ^
|
s856475011 | p00533 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
int a,b,flag;
char ch;
cin>>a>>b;
for(int i= 0;i<a;i++){
flag = -1;
for(int j = 0 ; j < b;j++){
scanf("%c",&ch);
if(ch == 'c'){
cout << '0';
flag = 0;
}else{
if (flag == -1)cout << flag;
else cout << ++flag;
}
if(j!=b-1)cout << ' ';
}
cout<<endl;
}
retrun 0;
} | a.cc: In function 'int main()':
a.cc:24:7: error: 'retrun' was not declared in this scope
24 | retrun 0;
| ^~~~~~
|
s665055550 | p00533 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int H=sc.nextInt();
int W=sc.nextInt();
boolean conte=true;
boolean[][] c=new boolean[H][W];
int[][] field=new int[H][W];
String[] str=new String[H];
for(int i=0;i<H;i++){
str[i]=sc.next();
for(int k=0;k<W;k++){
field[i][k]=-1;
c[i][k]=false;
}
}
sc.close();
for(int i=0;i<H;i++){
int j=0;
conte=true;
while(conte && j< str[i].length()){
if(str[i].indexOf('c',j) == -1){
conte=false;
}else{
c[i][str[i].indexOf('c',j)]=true;
field[i][str[i].indexOf('c',j)]=0;
j=str[i].indexOf('c',j);
}
j++;
}
}
for(int i=0;i<H;i++){
for(int k=0;k<W-1;k++){
if(c[i][k]==true && c[i][k+1]==false){
field[i][k+1]=field[i][k]+1;
c[i][k+1]=true;
}
}
}
for(int i=0;i<H;i++){
for (int k=0;k<W-1;k++){
System.out.printf("%d ", field[i][k]);
}
System.out.printf("%d\n",field[i][W-1]);
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s311478870 | p00533 | C++ | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
int cnt=0;
int ccnt=0;
int i = 0,k = 0;
String data[][] = new String[H][W];
for(i = 0;i < H;i++){
for(k = 0;k < W;k++){
data[i][k] = sc.next();
}
}
for(i = 0;i < H;i++){
for(k = 0;k < W;k++){
if(data[i][k].equals(".")){
if(ccnt != 1){
if((k+1)==W){
System.out.println(-1);
ccnt = 0;
cnt = 0;
}else {
System.out.print(-1);
System.out.print(" ");
}
}else{
if((k+1)==W){
cnt++;
System.out.println(cnt);
ccnt = 0;
cnt = 0;
}else{
cnt++;
System.out.print(cnt);
System.out.print(" ");
}
}
}
else if(data[i][k].equals("c")){
cnt = 0;
ccnt = 1;
if((k+1)==W){
System.out.println(0);
ccnt = 0;
}else {
System.out.print(0);
System.out.print(" ");
}
}
}
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s471058915 | p00533 | C++ | #include <iostream>
#include<vector>
#include<string>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
for(int c=0;c<a;c++){
string d;
cin>>d;
vector<int>s(b);
for(int e=0;e<b;e++){
if(d[e]=='c')s[e]++;
}
for(int f=0;f<a;f++){int q=-1;
for(int g=f;g!=0;g--){
if(s[g]){q]=f=g;break;}
}
cout<<q;
}
cout<<endl;
}
} | a.cc: In function 'int main()':
a.cc:19:43: error: expected ';' before ']' token
19 | if(s[g]){q]=f=g;break;}
| ^
| ;
|
s713243967 | p00533 | C++ | #include<iostream>
using namespace std;
int main(){
int h, w, i, j, ch;
char cl[100][100];
int po[100][100];
cin >> h >> w;
for (i=0; i<h; i++){
cin >> cl[i];
}
for (i=0; i<h; i++){
for (j=w; j>0; j--){
ch = j;po[i][j-1]=0;
while(ch > 0){
if (cl[i][ch-1] == 'c'){
break;
}
ch--;
if(ch==0){
po[i][j-1]=-1;
// cout << po[i][j-1];
break;
}
po[i][j-1]++;
}
}
} | a.cc: In function 'int main()':
a.cc:32:4: error: expected '}' at end of input
32 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s942046334 | p00533 | C++ | AIZU ONLINE JUDGE
PAGETOP
??
???????????????
??
??????????????°
??
???????????????
??
???????????????
??
?????????
??
??
?????°??¢??????
??????????¨????
??\??¬??? ?? ??±???
My Status
?????????????????????????????
HOME-
Notes
#1599446
Solution for 0610: Weather Forecaster by rainkouta
?????????????????? ??????????????? ???????????±??????
?????? ??¢?????????: public ?????? ?????§??°: 21 ??????
00.00 sec ??????612 KB ??????30 lines ?????? 367 bytes ??????2015-12-02 17:57
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include<stdio.h>
int main()
{
????????int H,W,a,b,c=-1,d=0,e,f,g;
????????char HW[101][101];
????????scanf("%d %d",&H,&W);
????????????????for(b=0;b<H;b++){
????????scanf("%s",&HW[b]);
????????}
????????for(a=0;a<H;a++){
????????????????for(b=0;b<W;b++){
????????????????????????if(HW[a][b]=='c'){
????????????????????????????????c=0;
????????????????????????????????d=1;
????????????????????????}
????????????????????????printf("%d",c);
????????????????????????if(d==1)
????????????????????????c++;
????????????????????????if(W-1==b){
????????????????????????printf("\n");
????????????????????????c=-1;
????????????????????????d=0;
????????????????????????}
????????????????????????else
????????????????????????printf(" ");
????????????????}
????????}
????????return 0;
}
Compile Error Logs:
You are not authorized to see the message.
???????????????
Judge: 7/7
C
CPU: 00.00 sec
Memory: 612 KB
Length: 367 B
2015-12-02 17:57
2015-12-02 17:57
???????????±?????????????????????
Case #
Verdict
CPU Time
Memory
In
Out
Case Name
Case #1:
: Accepted
00.00 sec
604 KB
19 B
30 B
2015-yo-t3-in_s1.txt
Case #2:
: Accepted
00.00 sec
604 KB
58 B
116 B
2015-yo-t3-in_s2.txt
Case #3:
: Accepted
00.00 sec
608 KB
321 B
654 B
2015-yo-t3-in1.txt
Case #4:
: Accepted
00.00 sec
612 KB
3306 B
7021 B
2015-yo-t3-in2.txt
Case #5:
: Accepted
00.00 sec
612 KB
9414 B
18737 B
2015-yo-t3-in3.txt
Case #6:
: Accepted
00.00 sec
612 KB
10006 B
19854 B
2015-yo-t3-in4.txt
Case #7:
: Accepted
00.00 sec
612 KB
10108 B
23965 B
2015-yo-t3-in5.txt
< prev |
1
/
7
| next >
??
??: Accepted ???????????? 00.00 sec ???????????? 604 KB
??
Judge Input #1 ( in1.txt | 19 B)
Judge Output #1 ( out1.txt | 30 B)
3 4
c..c
..c.
....
0 1 2 0
-1 -1 0 1
-1 -1 -1 -1
Comments
??
????\????????§??????
??
Categories
??
??
Free Tags
??
??
??
????
??
Aizu Online Judge
follow us on Twitter
About us
ContactSystem InfoThe University of AizuUniv. of Aizu Competitive Programming Club
Tools
WEB Board ToolsVirtual ArenaAPI ReferenceTutorial
Links
ACM/ICPCACM/ICPC Asia JapanACM-ICPC OB/OG Alumni GroupPC KoshienJOI
AtCoderTopCoderCodeForces
Uva Online judgesACM-ICPC Live ArchivePKU JudgeOnline
Aizu IT Arena
Best viewed using Firefox, Google Chrome
Aizu Online Judge Version 1.0 ?? 2004 - 2016 Univ. of Aizu Competitive Programming Club (ICPCPC), Database Systems Lab. University of Aizu
?? | a.cc:6:15: error: extended character ° is not valid in an identifier
6 | ??????????????°
| ^
a.cc:15:6: error: extended character ° is not valid in an identifier
15 | ?????°??¢??????
| ^
a.cc:15:9: error: extended character ¢ is not valid in an identifier
15 | ?????°??¢??????
| ^
a.cc:17:3: error: stray '\' in program
17 | ??\??¬??? ?? ??±???
| ^
a.cc:17:6: error: extended character ¬ is not valid in an identifier
17 | ??\??¬??? ?? ??±???
| ^
a.cc:17:16: error: extended character ± is not valid in an identifier
17 | ??\??¬??? ?? ??±???
| ^
a.cc:1599447:47: error: extended character ± is not valid in an identifier
a.cc:1599448:10: error: extended character ¢ is not valid in an identifier
a.cc:1599448:42: error: extended character § is not valid in an identifier
a.cc:1599448:46: error: extended character ° is not valid in an identifier
a.cc:1599520:12: error: extended character ± is not valid in an identifier
a.cc:1599521:6: error: stray '#' in program
a.cc:1599528:6: error: stray '#' in program
a.cc:1599535:6: error: stray '#' in program
a.cc:1599542:6: error: stray '#' in program
a.cc:1599549:6: error: stray '#' in program
a.cc:1599556:6: error: stray '#' in program
a.cc:1599563:6: error: stray '#' in program
a.cc:1599570:6: error: stray '#' in program
a.cc:1599586:13: error: stray '#' in program
a.cc:1599588:14: error: stray '#' in program
a.cc:1599599:5: error: stray '\' in program
a.cc:1599599:14: error: extended character § is not valid in an identifier
a.cc:1:1: error: 'AIZU' does not name a type
1 | AIZU ONLINE JUDGE
| ^~~~
a.cc: In function 'int main()':
a.cc:1599483:1: error: expected primary-expression before '?' token
a.cc:1599483:2: error: expected primary-expression before '?' token
a.cc:1599483:3: error: expected primary-expression before '?' token
a.cc:1599483:4: error: expected primary-expression before '?' token
a.cc:1599483:5: error: expected primary-expression before '?' token
a.cc:1599483:6: error: expected primary-expression before '?' token
a.cc:1599483:7: error: expected primary-expression before '?' token
a.cc:1599483:8: error: expected primary-expression before '?' token
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599483:9: error: expected ':' before 'int'
a.cc:1599483:9: error: expected primary-expression before 'int'
a.cc:1599484:1: error: expected primary-expression before '?' token
a.cc:1599484:2: error: expected primary-expression before '?' token
a.cc:1599484:3: error: expected primary-expression before '?' token
a.cc:1599484:4: error: expected primary-expression before '?' token
a.cc:1599484:5: error: expected primary-expression before '?' token
a.cc:1599484:6: error: expected primary-expression before '?' token
a.cc:1599484:7: error: expected primary-expression before '?' token
a.cc:1599484:8: error: expected primary-expression before '?' token
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599484:9: error: expected ':' before 'char'
a.cc:1599484:9: error: expected primary-expression before 'char'
a.cc:1599485:1: error: expected primary-expression before '?' token
a.cc:1599485:2: error: expected primary-expression before '?' token
a.cc:1599485:3: error: expected primary-expression before '?' token
a.cc:1599485:4: error: expected primary-expression before '?' token
a.cc:1599485:5: error: expected primary-expression before '?' token
a.cc:1599485:6: error: expected primary-expression before '?' token
a.cc:1599485:7: error: expected primary-expression before '?' token
a.cc:1599485:8: error: expected primary-expression before '?' token
a.cc:1599485:24: error: 'H' was not declared in this scope
a.cc:1599485:27: error: 'W' was not declared in this scope
a.cc:1599485:9: error: 'scanf' was not declared in this scope
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599485:29: error: expected ':' before ';' token
a.cc:1599485:29: error: expected primary-expression before ';' token
a.cc:1599486:1: error: expected primary-expression before '?' token
a.cc:1599486:2: error: expected primary-expression before '?' token
a.cc:1599486:3: error: expected primary-expression before '?' token
a.cc:1599486:4: error: expected primary-expression before '?' token
a.cc:1599486:5: error: expected primary-expression before '?' token
a.cc:1599486:6: error: expected primary-expression before '?' token
a.cc:1599486:7: error: expected primary-expression before '?' token
a.cc:1599486:8: error: expected primary-expression before '?' token
a.cc:1599486:9: error: expected primary-expression before '?' token
a.cc:1599486:10: error: expected primary-expression before '?' token
a.cc:1599486:11: error: expected primary-expression before '?' token
a.cc:1599486:12: error: expected primary-expression before '?' token
a.cc:1599486:13: error: expected primary-expression before '?' token
a.cc:1599486:14: error: expected primary-expression before '?' token
a.cc:1599486:15: error: expected primary-expression before '?' token
a.cc:1599486:16: error: expected primary-expression before '?' token
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:17: error: expected ':' before 'for'
a.cc:1599486:17: error: expected primary-expression before 'for'
a.cc:1599486:25: error: 'b' was not declared in this scope
a.cc:1599489:1: error: expected primary-expression before '?' token
a.cc:1599489:2: error: expected primary-expression before '?' token
a.cc:1599489:3: error: expected primary-expression before '?' token
a.cc:1599489:4: error: expected primary-expression before '?' token
a.cc:1599489:5: error: expected primary-expression before '?' token
a.cc:1599489:6: error: expected primary-expression before '?' token
a.cc:1599489:7: error: expected primary-expression before '?' token
a.cc:1599489:8: error: expected primary-expression before '?' token
a.cc:1599489:9: error: expected primary-expression before 'for'
a.cc:1599489:9: error: expected ':' before 'for'
a.cc:1599489:9: error: expected primary-expression b |
s049200283 | p00533 | C++ | include<stdio.h>
int main(){
????char c;
????int w,h,k,i;
????scanf("%d %d",&h,&w);
????while(h--){
????????k=-1;
????????for(i=0;i<w;i++){
????????????scanf(" %c",&c);
????????????if(c=='c')k=0;
????????????else if(k+1)k++;
????????????if(i)printf(" ");
????????????printf("%d",k);
????????}
????????printf("\n");
????}
????return 0;
}
Compile Error Logs:
You are not authorized to see the message.
???????????????
Judge: 7/7
C
CPU: 00.00 sec
Memory: 600 KB
Length: 280 B
2015-07-17 17:14
2015-07-17 17:14
???????????±?????????????????????
Case #
Verdict
CPU Time
Memory
In
Out
Case Name
Case #1:
: Accepted
00.00 sec
600 KB
19 B
30 B
2015-yo-t3-in_s1.txt
Case #2:
: Accepted
00.00 sec
600 KB
58 B
116 B
2015-yo-t3-in_s2.txt
Case #3: | a.cc:30:12: error: extended character ± is not valid in an identifier
30 | ???????????±?????????????????????
| ^
a.cc:31:6: error: stray '#' in program
31 | Case #
| ^
a.cc:38:6: error: stray '#' in program
38 | Case #1:
| ^
a.cc:45:6: error: stray '#' in program
45 | Case #2:
| ^
a.cc:52:6: error: stray '#' in program
52 | Case #3:
| ^
a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
a.cc:19:1: error: 'Compile' does not name a type
19 | Compile Error Logs:
| ^~~~~~~
|
s298845514 | p00533 | C++ | include<stdio.h>
int main(){
????char c;
????int w,h,k,i;
????scanf("%d %d",&h,&w);
????while(h--){
????????k=-1;
????????for(i=0;i<w;i++){
????????????scanf(" %c",&c);
????????????if(c=='c')k=0;
????????????else if(k+1)k++;
????????????if(i)printf(" ");
????????????printf("%d",k);
????????}
????????printf("\n");
????}
????return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
|
s029477529 | p00533 | C++ | #include<stdio.h>
int main(){
????char c;
????int w,h,k,i;
????scanf("%d %d",&h,&w);
????while(h--){
????????k=-1;
????????for(i=0;i<w;i++){
????????????scanf(" %c",&c);
????????????if(c=='c')k=0;
????????????else if(k+1)k++;
????????????if(i)printf(" ");
????????????printf("%d",k);
????????}
????????printf("\n");
????}
????return
} | a.cc: In function 'int main()':
a.cc:3:1: error: expected primary-expression before '?' token
3 | ????char c;
| ^
a.cc:3:2: error: expected primary-expression before '?' token
3 | ????char c;
| ^
a.cc:3:3: error: expected primary-expression before '?' token
3 | ????char c;
| ^
a.cc:3:4: error: expected primary-expression before '?' token
3 | ????char c;
| ^
a.cc:3:5: error: expected primary-expression before 'char'
3 | ????char c;
| ^~~~
a.cc:3:5: error: expected ':' before 'char'
3 | ????char c;
| ^~~~
| :
a.cc:3:5: error: expected primary-expression before 'char'
3 | ????char c;
| ^~~~
a.cc:3:5: error: expected ':' before 'char'
3 | ????char c;
| ^~~~
| :
a.cc:3:5: error: expected primary-expression before 'char'
3 | ????char c;
| ^~~~
a.cc:3:5: error: expected ':' before 'char'
3 | ????char c;
| ^~~~
| :
a.cc:3:5: error: expected primary-expression before 'char'
3 | ????char c;
| ^~~~
a.cc:3:5: error: expected ':' before 'char'
3 | ????char c;
| ^~~~
| :
a.cc:3:5: error: expected primary-expression before 'char'
3 | ????char c;
| ^~~~
a.cc:4:1: error: expected primary-expression before '?' token
4 | ????int w,h,k,i;
| ^
a.cc:4:2: error: expected primary-expression before '?' token
4 | ????int w,h,k,i;
| ^
a.cc:4:3: error: expected primary-expression before '?' token
4 | ????int w,h,k,i;
| ^
a.cc:4:4: error: expected primary-expression before '?' token
4 | ????int w,h,k,i;
| ^
a.cc:4:5: error: expected primary-expression before 'int'
4 | ????int w,h,k,i;
| ^~~
a.cc:4:5: error: expected ':' before 'int'
4 | ????int w,h,k,i;
| ^~~
| :
a.cc:4:5: error: expected primary-expression before 'int'
4 | ????int w,h,k,i;
| ^~~
a.cc:4:5: error: expected ':' before 'int'
4 | ????int w,h,k,i;
| ^~~
| :
a.cc:4:5: error: expected primary-expression before 'int'
4 | ????int w,h,k,i;
| ^~~
a.cc:4:5: error: expected ':' before 'int'
4 | ????int w,h,k,i;
| ^~~
| :
a.cc:4:5: error: expected primary-expression before 'int'
4 | ????int w,h,k,i;
| ^~~
a.cc:4:5: error: expected ':' before 'int'
4 | ????int w,h,k,i;
| ^~~
| :
a.cc:4:5: error: expected primary-expression before 'int'
4 | ????int w,h,k,i;
| ^~~
a.cc:5:1: error: expected primary-expression before '?' token
5 | ????scanf("%d %d",&h,&w);
| ^
a.cc:5:2: error: expected primary-expression before '?' token
5 | ????scanf("%d %d",&h,&w);
| ^
a.cc:5:3: error: expected primary-expression before '?' token
5 | ????scanf("%d %d",&h,&w);
| ^
a.cc:5:4: error: expected primary-expression before '?' token
5 | ????scanf("%d %d",&h,&w);
| ^
a.cc:5:20: error: 'h' was not declared in this scope
5 | ????scanf("%d %d",&h,&w);
| ^
a.cc:5:23: error: 'w' was not declared in this scope
5 | ????scanf("%d %d",&h,&w);
| ^
a.cc:5:25: error: expected ':' before ';' token
5 | ????scanf("%d %d",&h,&w);
| ^
| :
a.cc:5:25: error: expected primary-expression before ';' token
a.cc:5:25: error: expected ':' before ';' token
5 | ????scanf("%d %d",&h,&w);
| ^
| :
a.cc:5:25: error: expected primary-expression before ';' token
a.cc:5:25: error: expected ':' before ';' token
5 | ????scanf("%d %d",&h,&w);
| ^
| :
a.cc:5:25: error: expected primary-expression before ';' token
a.cc:5:25: error: expected ':' before ';' token
5 | ????scanf("%d %d",&h,&w);
| ^
| :
a.cc:5:25: error: expected primary-expression before ';' token
a.cc:6:1: error: expected primary-expression before '?' token
6 | ????while(h--){
| ^
a.cc:6:2: error: expected primary-expression before '?' token
6 | ????while(h--){
| ^
a.cc:6:3: error: expected primary-expression before '?' token
6 | ????while(h--){
| ^
a.cc:6:4: error: expected primary-expression before '?' token
6 | ????while(h--){
| ^
a.cc:6:5: error: expected primary-expression before 'while'
6 | ????while(h--){
| ^~~~~
a.cc:6:5: error: expected ':' before 'while'
6 | ????while(h--){
| ^~~~~
| :
a.cc:6:5: error: expected primary-expression before 'while'
6 | ????while(h--){
| ^~~~~
a.cc:6:5: error: expected ':' before 'while'
6 | ????while(h--){
| ^~~~~
| :
a.cc:6:5: error: expected primary-expression before 'while'
6 | ????while(h--){
| ^~~~~
a.cc:6:5: error: expected ':' before 'while'
6 | ????while(h--){
| ^~~~~
| :
a.cc:6:5: error: expected primary-expression before 'while'
6 | ????while(h--){
| ^~~~~
a.cc:6:5: error: expected ':' before 'while'
6 | ????while(h--){
| ^~~~~
| :
a.cc:6:5: error: expected primary-expression before 'while'
6 | ????while(h--){
| ^~~~~
a.cc:17:1: error: expected primary-expression before '?' token
17 | ????return
| ^
a.cc:17:2: error: expected primary-expression before '?' token
17 | ????return
| ^
a.cc:17:3: error: expected primary-expression before '?' token
17 | ????return
| ^
a.cc:17:4: error: expected primary-expression before '?' token
17 | ????return
| ^
a.cc:17:5: error: expected primary-expression before 'return'
17 | ????return
| ^~~~~~
a.cc:17:5: error: expected ':' before 'return'
17 | ????return
| ^~~~~~
| :
a.cc:17:5: error: expected primary-expression before 'return'
17 | ????return
| ^~~~~~
a.cc:17:5: error: expected ':' before 'return'
17 | ????return
| ^~~~~~
| :
a.cc:17:5: error: expected primary-expression before 'return'
17 | ????return
| ^~~~~~
a.cc:17:5: error: expected ':' before 'return'
17 | ????return
| ^~~~~~
| :
a.cc:17:5: error: expected primary-expression before 'return'
17 | ????return
| ^~~~~~
a.cc:17:5: error: expected ':' before 'return'
17 | ????return
| ^~~~~~
| :
a.cc:17:5: error: expected primary-expression before 'return'
17 | ????return
| ^~~~~~
|
s299268494 | p00533 | C++ | #include<stdio.h>
int main(void)
{
int w,h,i[105][105],j,A,last,r,f;
char f[105][105];
scanf("%d %d",&w,&h,);
for(i=0;i<h;i++){
scanf("%s",&f[i]);
}
for(i=0;i<h;i++){
last=-1;
for(j=0;j<w;j++){
}
}
for(i=0;i<100;i++){
for(j=0;j<w;j++){
if(f[i][j]=='c')
last=j;
r=-1;
if(last!=-1){
r=j-last;
printf("%d %c",r,j==w-1?'\n':' ');
}
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:14: error: conflicting declaration 'char f [105][105]'
5 | char f[105][105];
| ^
a.cc:4:40: note: previous declaration as 'int f'
4 | int w,h,i[105][105],j,A,last,r,f;
| ^
a.cc:6:29: error: expected primary-expression before ')' token
6 | scanf("%d %d",&w,&h,);
| ^
a.cc:7:14: error: incompatible types in assignment of 'int' to 'int [105][105]'
7 | for(i=0;i<h;i++){
| ~^~
a.cc:7:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | for(i=0;i<h;i++){
| ~^~
a.cc:7:21: error: lvalue required as increment operand
7 | for(i=0;i<h;i++){
| ^
a.cc:10:22: error: incompatible types in assignment of 'int' to 'int [105][105]'
10 | for(i=0;i<h;i++){
| ~^~
a.cc:10:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | for(i=0;i<h;i++){
| ~^~
a.cc:10:29: error: lvalue required as increment operand
10 | for(i=0;i<h;i++){
| ^
a.cc:15:14: error: incompatible types in assignment of 'int' to 'int [105][105]'
15 | for(i=0;i<100;i++){
| ~^~
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | for(i=0;i<100;i++){
| ~^~~~
a.cc:15:23: error: lvalue required as increment operand
15 | for(i=0;i<100;i++){
| ^
|
s633658946 | p00533 | C++ | #include<iostream>
using namespace std;
int main() {
char sky[100][100] = { -2999 };
int res[100][100];
int n, m, i, j, k;
scanf_s("%d%d", &n,&m);
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
scanf("%s", &sky[i][j]);
}
}
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
if (sky[i][j] == 'c') res[i][j] = 0;
else {
for (k = j - 1; k < m; k++) {
if (sky[i][k] == 'c') res[i][j] = i - k;
}
}
}
}
for (i = 0; i < n; i++) {
for (j = 0; j < m; j++) {
cout << res[i][j] << " ";
}
cout << endl;
}
} | a.cc: In function 'int main()':
a.cc:4:32: error: narrowing conversion of '-2999' from 'int' to 'char' [-Wnarrowing]
4 | char sky[100][100] = { -2999 };
| ^~~~~
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d%d", &n,&m);
| ^~~~~~~
| scanf
|
s012023110 | p00533 | C++ | #include<iostream>
using namespace std;
int H,W,x[1000][1000],c[1000][1000];
int main(){
cin>>H>>W;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
char f;cin>>f;
if(f~=='c')x[i][j]=1;
c[i][j]=-1;
}
}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
for(int k=j;k>=0;k--){
if(x[i][k]==1){c[i][j]=j-k;break;}
}
}
}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
if(j>0)cout<<' ';
cout<<c[i][j];
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:29: error: expected ')' before '~' token
9 | if(f~=='c')x[i][j]=1;
| ~ ^
| )
|
s901598987 | p00533 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int main(void){
int h,w,con=0;
char c[100][100],d[1
string str;
string::size_type index;
cin>>h>>w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>c[i][j];
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
str=(c[i][j]);
index=str.find("c");
if(index!=-1){
cout<<0<<" ";
con=1;
}
else if(index==-1&&con==0){
cout<<-1<<" ";
}
else{
cout<<con<<" ";
con++;
}
}
cout<<endl;
con=0;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:29: error: expected ']' before 'string'
6 | char c[100][100],d[1
| ^
| ]
7 | string str;
| ~~~~~~
a.cc:20:25: error: 'str' was not declared in this scope; did you mean 'std'?
20 | str=(c[i][j]);
| ^~~
| std
|
s423983815 | p00533 | C++ | #include<iostream>
#include<cstring>
using namespace std;
int main(void){
int h,w,con=0;
char c[100][100],d[100][100];
string str;
cin>>h>>w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>c[i][j];
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
str=(c[i][j]);
index=str.find("c");
if(index!=-1){
cout<<0<<" ";
con=1;
}
else if(index==-1&&con==0){
cout<<-1<<" ";
}
else{
cout<<con<<" ";
con++;
}
}
cout<<endl;
con=0;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:20:43: error: overloaded function with no contextual type information
20 | index=str.find("c");
| ^
a.cc:22:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator!='
22 | if(index!=-1){
| ~~~~~^~~~
a.cc:27:38: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
27 | else if(index==-1&&con==0){
| ~~~~~^~~~
|
s312848404 | p00533 | C++ | #include <iosream>
using namespace std;
int main(){
int h, w, a[100][100];
char in;
cin >> h >> w;
for(int i = 0; i<h;i++){
for(int j = 0;j<w;j++){
cin >> in;
if(in == 'c') a[i][j] == 0;
else if(j == 0) a[i][0] = -1;
else if(a[i][j-1] == -1) a[i][j] = -1;
else a[i][j] = a[i][j-1] + 1;
cout << a[i][j];
}
cout << endl;
}
return 0;
} | a.cc:1:10: fatal error: iosream: No such file or directory
1 | #include <iosream>
| ^~~~~~~~~
compilation terminated.
|
s366598686 | p00533 | C++ | #include<stdio.h>
#include<iostream>
using namespace std;
int p[100][100];
int main(){
int w,h,i,j;
char c[201];
cin>>h>>w;
for(i=0;i<h;i++){
scanf("%s",c);
for(j=0;j<w;j++){
if(c[j]=='c')p[i][j]=0;
else p[i]j[]=-1;
}
}
for(i=0;i<h;i++){
for(j=1;j<w;j++){
if(p[i][j-1]>=0&&p[i][j]<0)p[i][j]=p[i][j-1]+1;
}
}
for(i=0;i<h;i++){
for(j=0;j<w;j++){
cout<<p[i][j];
if(j!=w-1)cout<<' ';
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:10: error: expected ';' before 'j'
13 | else p[i]j[]=-1;
| ^
| ;
|
s371227348 | p00533 | C++ | #include <iostream>
using namespace std;
int main (){
/*-------------custom------------------*/
int h,w,ans[101][101]={-2},checker,b=0;
char dr[101][101]={0};
/*-------------------------------------*/
/*-------------imput-------------------*/
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>dr[s][s_];
}
}
/*------------------------------------*/
/*-----------calcutation--------------*/
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]=='c'){
ans[s][s_]=0;
}
else {
for (int s__=s_;s__>=0;s__--){
if (dr[s][s__]=='.'&&checker!=-1){
checker=0;
}
else if (dr[s][s__]=='c'){
ans[s][s_]=b;
checker=-1;
}
b++;
}
if (checker==0){ans[s][s_]=-1;}
b=0; checker=0;
}
}
}
/*-------------------------------------*/
/*---------------output----------------*/
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<ans[s][s_];
}
else {
cout<<ans[s][s_]<<" ";
}
} cout<<endl;
/*------------------------------------*/
}
return 0;
}
~ | a.cc:54:2: error: expected class-name at end of input
54 | ~
| ^
|
s768323966 | p00533 | C++ | #include <iostream>
using namespace std;
int main (){
/*-------------custom------------------*/
int h,w,ans[101][101]={-2},checker,b=0;
char dr[101][101]={0};
/*-------------------------------------*/
/*-------------imput-------------------*/
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>dr[s][s_];
}
}
/*------------------------------------*/
/*-----------calcutation--------------*/
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]=='c'){
ans[s][s_]=0;
}
else {
for (int s__=s_;s__>=0;s__--){
if (dr[s][s__]=='.'&&checker!=-1){
checker=0;
}
else if (dr[s][s__]=='c'){
ans[s][s_]=b;
checker=-1;
}
b++;
}
if (checker==0){ans[s][s_]=-1;}
b=0; checker=0;
}
}
}
/*-------------------------------------*/
/*---------------output----------------*/
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<ans[s][s_];
}
else {
cout<<ans[s][s_]<<" ";
}
} cout<<endl;
/*------------------------------------*/
}
return 0;
}
~ | a.cc:54:2: error: expected class-name at end of input
54 | ~
| ^
|
s478745877 | p00533 | C++ | #include <iostream>
using namespace std;
int main (){
/*-------------custom------------------*/
int h,w,ans[101][101]={-2},checker,b=0;
char dr[101][101]={0};
/*-------------------------------------*/
/*-------------imput-------------------*/
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>dr[s][s_];
}
}
/*------------------------------------*/
/*-----------calcutation--------------*/
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]=='c'){
ans[s][s_]=0;
}
else {
for (int s__=s_;s__>=0;s__--){
if (dr[s][s__]=='.'&&checker!=-1){
checker=0;
}
else if (dr[s][s__]=='c'){
ans[s][s_]=b;
checker=-1;
}
b++;
}
if (checker==0){ans[s][s_]=-1;}
b=0; checker=0;
}
}
}
/*-------------------------------------*/
/*---------------output----------------*/
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<ans[s][s_];
}
else {
cout<<ans[s][s_]<<" ";
}
} cout<<endl;
/*------------------------------------*/
}
return 0;
}
~ | a.cc:54:2: error: expected class-name at end of input
54 | ~
| ^
|
s826993970 | p00533 | C++ | include <iostream>
using namespace std;
int main (){
char ny;
int dr[101][101],h,w,c=0,i;
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>ny;
dr[s][s_]=-1;
if (ny=='c')dr[s][s_]=0;
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]==0){
i=s_;
for (int s__=i;s__<w;s__++){
if (dr[s][s__]==0)c=0;
if (dr[s][s__]==-1){
c++;
dr[s][s__]=c;
}
}
c=0;
}
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<dr[s][s_];
}
else {
cout<<dr[s][s_]<<" ";
}
}
cout<<endl;
}
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>h>>w;
| ^~~
a.cc:33:17: error: 'cout' was not declared in this scope
33 | cout<<dr[s][s_];
| ^~~~
a.cc:36:17: error: 'cout' was not declared in this scope
36 | cout<<dr[s][s_]<<" ";
| ^~~~
a.cc:39:1: error: 'cout' was not declared in this scope
39 | cout<<endl;
| ^~~~
a.cc:39:7: error: 'endl' was not declared in this scope
39 | cout<<endl;
| ^~~~
|
s829769923 | p00533 | C++ | include <iostream>
using namespace std;
int main (){
char ny;
int dr[101][101],h,w,c=0,i;
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>ny;
dr[s][s_]=-1;
if (ny=='c')dr[s][s_]=0;
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]==0){
i=s_;
for (int s__=i;s__<w;s__++){
if (dr[s][s__]==0)c=0;
if (dr[s][s__]==-1){
c++;
dr[s][s__]=c;
}
}
c=0;
}
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<dr[s][s_];
}
else {
cout<<dr[s][s_]<<" ";
}
}
cout<<endl;
}
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>h>>w;
| ^~~
a.cc:33:17: error: 'cout' was not declared in this scope
33 | cout<<dr[s][s_];
| ^~~~
a.cc:36:17: error: 'cout' was not declared in this scope
36 | cout<<dr[s][s_]<<" ";
| ^~~~
a.cc:39:1: error: 'cout' was not declared in this scope
39 | cout<<endl;
| ^~~~
a.cc:39:7: error: 'endl' was not declared in this scope
39 | cout<<endl;
| ^~~~
|
s234532754 | p00533 | C++ | include <iostream>
using namespace std;
int main (){
char ny;
int dr[101][101],h,w,c=0,i;
cin>>h>>w;
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
cin>>ny;
dr[s][s_]=-1;
if (ny=='c')dr[s][s_]=0;
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (dr[s][s_]==0){
i=s_;
for (int s__=i;s__<w;s__++){
if (dr[s][s__]==0)c=0;
if (dr[s][s__]==-1){
c++;
dr[s][s__]=c;
}
}
c=0;
}
}
}
for (int s=0;s<h;s++){
for (int s_=0;s_<w;s_++){
if (s_==w-1){
cout<<dr[s][s_];
}
else {
cout<<dr[s][s_]<<" ";
}
}
cout<<endl;
}
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>h>>w;
| ^~~
a.cc:33:17: error: 'cout' was not declared in this scope
33 | cout<<dr[s][s_];
| ^~~~
a.cc:36:17: error: 'cout' was not declared in this scope
36 | cout<<dr[s][s_]<<" ";
| ^~~~
a.cc:39:1: error: 'cout' was not declared in this scope
39 | cout<<endl;
| ^~~~
a.cc:39:7: error: 'endl' was not declared in this scope
39 | cout<<endl;
| ^~~~
|
s754334694 | p00533 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
using namespace std;
#define REP(i,n) for (int i = 0; i < n; i++)
int main() {
int H, W;
char w[123][123];
scanf("%d %d", &H, &W);
REP(i, H) scanf("%s", w[i]);
int r[123][123];
memset(r, 0xFF, sizeof(r));
REP(i, H) {
REP(j, W) {
if (j != 0 && r[i][j - 1] != -1) r[i][j] = r[i][j - 1] + 1;
if (w[i][j] == 'c') r[i][j] = 0;
}
}
REP(i, H) {
REP(j, W) {
printf("%d", r[i][j]);
if (j != W - 1) printf(" ");
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:24:9: error: 'memset' was not declared in this scope
24 | memset(r, 0xFF, sizeof(r));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include <numeric>
+++ |+#include <cstring>
9 |
|
s334105993 | p00533 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
using namespace std;
#define REP(i,n) for (int i = 0; i < n; i++)
int main() {
int H, W;
char w[123][123];
scanf("%d %d", &H, &W);
REP(i, H) scanf("%s", w[i]);
int r[123][123];
memset(r, 0xFF, sizeof(r));
REP(i, H) {
REP(j, W) {
if (j != 0 && r[i][j - 1] != -1) r[i][j] = r[i][j - 1] + 1;
if (w[i][j] == 'c') r[i][j] = 0;
}
}
REP(i, H) {
REP(j, W) {
printf("%d", r[i][j]);
if (j != W - 1) printf(" ");
}
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:25:9: error: 'memset' was not declared in this scope
25 | memset(r, 0xFF, sizeof(r));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include <string>
+++ |+#include <cstring>
10 |
|
s994140575 | p00534 | Java | import java.io.*;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
StringTokenier st=new StringTokenizer(line);
int n=Integer.parseInt(st.nextToken());
int m=Integer.parseInt(st.nextToken());
int[][] tir=new int[n+1][m];
int[] d=new int[n];
int[] c=new int[m];
for(int i=0;i<n;i++) d[i]=Integer.parseInt(br.readLine());
for(int i=0;i<m;i++) c[i]=Integer.parseInt(br.readLine());
for(int i=n-1;i>=0;i--){
for(int j=m-2;j>=0;j--){
tir[i][j]=Math.min(tir[i][j+1],tir[i+1][j+1]+d[i]*c[j]);
}
}
out.println(tir[0][0]);
out.flush();
}
}
} | Main.java:12: error: cannot find symbol
StringTokenier st=new StringTokenizer(line);
^
symbol: class StringTokenier
location: class Main
1 error
|
s900305707 | p00534 | Java | import java.io.*;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
StringTokenizer st=new StringTokenizer(line);
int n=Integer.parseInt(st.nextToken());
int m=Integer.parseInt(st.nextToken());
int[][] tir=new int[m][n+1];
Arrays.fill(tir[m-1],INF);
tir[m-1][n]=0
int[] d=new int[n];
int[] c=new int[m];
for(int i=0;i<n;i++) d[i]=Integer.parseInt(br.readLine());
for(int i=0;i<m;i++) c[i]=Integer.parseInt(br.readLine());
for(int i=n-1;i>=0;i--){
for(int j=m-2;j>=0;j--){
tir[j][i]=Math.min(tir[j][i+1],tir[j+1][i+1]+d[j]*c[i]);
}
}
out.println(tir[0][0]);
out.flush();
}
}
} | Main.java:18: error: ';' expected
tir[m-1][n]=0
^
1 error
|
s541409419 | p00534 | Java | import java.io.*;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
StringTokenizer st=new StringTokenizer(line);
int n=Integer.parseInt(st.nextToken());
int m=Integer.parseInt(st.nextToken());
int[][] tir=new int[m][n+1];
Arrays.fill(tir[m-1],INF);
tir[m-1][n]=0;
int[] d=new int[n];
int[] c=new int[m];
for(int i=0;i<n;i++) d[i]=Integer.parseInt(br.readLine());
for(int i=0;i<m;i++) c[i]=Integer.parseInt(br.readLine());
for(int i=n-1;i>=0;i--){
for(int j=m-2;j>=0;j--){
tir[j][i]=Math.min(tir[j][i+1],tir[j+1][i+1]+d[j]*c[i]);
}
}
out.println(tir[0][0]);
out.flush();
}
}
} | Main.java:17: error: cannot find symbol
Arrays.fill(tir[m-1],INF);
^
symbol: variable Arrays
location: class Main
1 error
|
s209414999 | p00534 | Java | package ex;
import java.util.*;
public class Q2 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int[] r = new int[n+3];
int[] day = new int[m+3];
int[] day2 = new int[m+3];
int ans=0;
int count=0;
for(int i=0;i<n;i++){
r[i] = sc.nextInt();
}
for(int i=0;i<m;i++) {
day[i] = sc.nextInt();
}
count=0;
for(int i=0;i<m;i++){
if(day[i]!=0 ){
ans=ans+day[i]*r[count];
}
if(count==n-1) break;
count+=1;
}
System.out.println(ans);
}
} | Main.java:3: error: class Q2 is public, should be declared in a file named Q2.java
public class Q2 {
^
1 error
|
s338949020 | p00534 | Java | package ex;
import java.util.*;
public class Q2 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int[] r = new int[n+3];
int[] day = new int[m+3];
int ans=0;
int count=0;
for(int i=0;i<n;i++){
r[i] = sc.nextInt();
}
for(int i=0;i<m;i++) {
day[i] = sc.nextInt();
}
count=0;
for(int i=0;i<m;i++){
if(day[i]!=0 ){
ans=ans+day[i]*r[count];
}
if(count==n-1) break;
count+=1;
}
System.out.println(ans);
}
} | Main.java:3: error: class Q2 is public, should be declared in a file named Q2.java
public class Q2 {
^
1 error
|
s057862709 | p00534 | Java | import java.util.*;
public class Q2 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int[] r = new int[n+3];
int[] day = new int[m+3];
int ans=0;
int count=0;
for(int i=0;i<n;i++){
r[i] = sc.nextInt();
}
for(int i=0;i<m;i++) {
day[i] = sc.nextInt();
}
count=0;
for(int i=0;i<m;i++){
if(day[i]!=0 ){
ans=ans+day[i]*r[count];
}
if(count==n-1) break;
count+=1;
}
System.out.println(ans);
}
} | Main.java:2: error: class Q2 is public, should be declared in a file named Q2.java
public class Q2 {
^
1 error
|
s868268336 | p00534 | C | #include<cstdio>
int N=0,M=0;
int D[1010]={},C[1010]={};
int min(int a,int b){
if (a<b){
return a;
}
return b;
}
int mena(int i,int j){//???i????¬?????????????????????? j????????\??????
if (M<j){
//printf("%d??\??\????????????%d??\?????\????????£??????return 1000009",M,j);
return 1000009;
}
if (N<i){
//printf("%d??????????????????????????°????????????%d?????\???",)
return 0;
}
return min(mena(i,j+1),mena(i+1,j+1)+C[j]*D[i]);
}
int main(){
scanf("%d %d",&N,&M);
for(int i=1;i<N+1;i++){
scanf("%d",&D[i]);
}
for(int i=0;i<M;i++){
scanf("%d",&C[i]);
}
printf("%d",mena(1,1));
return 0;
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s133241617 | p00534 | C | #define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a=a<b?a:b
main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | main.c:5:13: error: expected ')' before '[' token
5 | main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^
| )
|
s623797062 | p00534 | C | #define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a=a<b?a:b
main(w,n,m,c[],d[],p[]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | main.c:5:13: error: expected ')' before '[' token
5 | main(w,n,m,c[],d[],p[]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^
| )
|
s663473460 | p00534 | C | #define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a=a<b?a:b
int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | main.c:5:26: error: return type defaults to 'int' [-Wimplicit-int]
5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^~~~
main.c: In function 'main':
main.c:3:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:33: note: in expansion of macro 's'
5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define k 1024
main.c:3:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:33: note: in expansion of macro 's'
5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^
main.c:3:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:33: note: in expansion of macro 's'
5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^
main.c:5:119: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^~~~~~
main.c:5:119: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:119: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:119: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s878229450 | p00534 | C | #define k 1024
#define r(a) for(i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a>b&&a=b
i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | main.c:5:1: warning: data definition has no type or storage class
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:5:3: error: type defaults to 'int' in declaration of 'w' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:5: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:7: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:9: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:14: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:19: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:24: error: return type defaults to 'int' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c: In function 'main':
main.c:3:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define k 1024
main.c:3:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:3:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:4:22: error: lvalue required as left operand of assignment
4 | #define m(a,b) a>b&&a=b
| ^
main.c:5:86: note: in expansion of macro 'm'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:117: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~~~
main.c:5:117: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:117: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:117: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:137: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define k 1024
main.c:5:137: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c:5:137: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s265738933 | p00534 | C | #define k 1024
#define r(a) for(i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a<b?:a=b
i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);} | main.c:5:1: warning: data definition has no type or storage class
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:5:3: error: type defaults to 'int' in declaration of 'w' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:5: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:7: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:9: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:14: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:19: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:24: error: return type defaults to 'int' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c: In function 'main':
main.c:3:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define k 1024
main.c:3:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:3:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:4:22: error: lvalue required as left operand of assignment
4 | #define m(a,b) a<b?:a=b
| ^
main.c:5:86: note: in expansion of macro 'm'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:117: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~~~
main.c:5:117: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:117: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:117: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:137: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define k 1024
main.c:5:137: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c:5:137: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s804128389 | p00534 | C | #define k 1024
#define r(a) for(i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a=a<b?a:b
i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);} | main.c:5:1: warning: data definition has no type or storage class
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:5:3: error: type defaults to 'int' in declaration of 'w' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:5: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:7: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:9: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:14: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:19: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:24: error: return type defaults to 'int' [-Wimplicit-int]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c: In function 'main':
main.c:3:14: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define k 1024
main.c:3:14: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:3:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
3 | #define s(a) scanf("%d",a);
| ^~~~~
main.c:5:31: note: in expansion of macro 's'
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:87: error: expected expression before ',' token
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^
main.c:5:114: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~~~
main.c:5:114: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:114: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:114: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:134: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define k 1024
main.c:5:134: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
5 | i,w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m)r(n)s(&w),m(p[i],p[i+1]+w*d[n-i-1]);printf("%d\n",p[0]),exit(0);}
| ^~~~
main.c:5:134: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s041919329 | p00534 | C | #define r(a,i)for(i=0;i<a;i++)
#define s (scanf("%d",&w),w)
#define c(a,b)a=a<b?a:b
d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();} | main.c:4:1: warning: data definition has no type or storage class
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:4:8: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^
main.c:4:15: error: return type defaults to 'int' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^~~~
main.c: In function 'main':
main.c:4:15: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:2:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:33: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:2:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:33: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^
main.c:2:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:33: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^
main.c:4:109: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^~~~~~
main.c:4:109: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:109: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:109: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:127: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:127: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit();}
| ^~~~
main.c:4:127: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:4:127: error: too few arguments to function 'exit'
|
s756565214 | p00534 | C | #define r(a,i)for(i=0;i<a;i++)
#define s (scanf("%d",&w),w)
#define c(a,b)a<b?:a=b
d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | main.c:4:1: warning: data definition has no type or storage class
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:4:8: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:15: error: return type defaults to 'int' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c: In function 'main':
main.c:4:15: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:2:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:33: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:2:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:33: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:2:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:33: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:3:21: error: lvalue required as left operand of assignment
3 | #define c(a,b)a<b?:a=b
| ^
main.c:4:82: note: in expansion of macro 'c'
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:109: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~~~
main.c:4:109: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:109: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:109: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:127: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:127: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
4 | d[999],p[999];main(i,j,w,n,m){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c:4:127: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s811386416 | p00534 | C | #define r(a,i)for(i=0;i<a;i++)
#define s (scanf("%d",&w),w)
#define c(a,b)a=a<b?a:b
d[999],p[999];main(i,j,w,n,m,*q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | main.c:4:1: warning: data definition has no type or storage class
4 | d[999],p[999];main(i,j,w,n,m,*q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:4:8: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m,*q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:30: error: expected ')' before '*' token
4 | d[999],p[999];main(i,j,w,n,m,*q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
| )
|
s502987474 | p00534 | C | #define r(a,i)for(i=0;i<a;i++)
#define s (scanf("%d",&w),w)
#define c(a,b)a=a<b?a:b
d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | main.c:4:1: warning: data definition has no type or storage class
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:4:8: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:15: error: return type defaults to 'int' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c: In function 'main':
main.c:4:15: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'q' defaults to 'int' [-Wimplicit-int]
main.c:2:12: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:35: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:2:12: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:35: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:2:12: note: include '<stdio.h>' or provide a declaration of 'scanf'
2 | #define s (scanf("%d",&w),w)
| ^~~~~
main.c:4:35: note: in expansion of macro 's'
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:85: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:92: error: invalid type argument of unary '*' (have 'int')
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~
main.c:3:15: note: in definition of macro 'c'
3 | #define c(a,b)a=a<b?a:b
| ^
main.c:4:92: error: invalid type argument of unary '*' (have 'int')
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~
main.c:3:17: note: in definition of macro 'c'
3 | #define c(a,b)a=a<b?a:b
| ^
main.c:4:96: error: subscripted value is neither array nor pointer nor vector
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:3:19: note: in definition of macro 'c'
3 | #define c(a,b)a=a<b?a:b
| ^
main.c:4:92: error: invalid type argument of unary '*' (have 'int')
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~
main.c:3:21: note: in definition of macro 'c'
3 | #define c(a,b)a=a<b?a:b
| ^
main.c:4:96: error: subscripted value is neither array nor pointer nor vector
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:3:23: note: in definition of macro 'c'
3 | #define c(a,b)a=a<b?a:b
| ^
main.c:4:113: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~~~
main.c:4:113: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:113: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:113: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:131: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:131: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
4 | d[999],p[999];main(i,j,w,n,m,q){n=s;m=s;r(n,i)d[i]=s;r(n,i)p[i]=1e9;r(m,j){s;r(n,i)q=p+i,c(*q,q[i]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c:4:131: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s033719513 | p00534 | C | #define r(a,i)for(i=0;i<a;i++)
#define s (scanf("%d",&w),w);
#define c(a,b)a=a<b?a:b
d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);} | main.c:4:1: warning: data definition has no type or storage class
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:4:8: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
main.c:4:15: error: return type defaults to 'int' [-Wimplicit-int]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c: In function 'main':
main.c:4:15: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'w' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:4:15: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:4:33: error: 'sm' undeclared (first use in this function); did you mean 'm'?
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~
| m
main.c:4:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:36: error: implicit declaration of function 'sr'; did you mean 'r'? [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~
| r
main.c:4:43: error: expected ';' before 'd'
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
| ;
main.c:4:78: error: expected ';' before 'p'
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^
| ;
main.c:4:105: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:105: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~~~
main.c:4:105: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:123: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
+++ |+#include <stdlib.h>
1 | #define r(a,i)for(i=0;i<a;i++)
main.c:4:123: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
4 | d[999],p[999];main(i,j,w,n,m){n=sm=sr(n,i)d[i]=sr(n,i)p[i]=1e9;r(m,j){sr(n,i)c(p[i],p[i+1]+w*d[n-i-1]);}printf("%d\n",*p),exit(0);}
| ^~~~
main.c:4:123: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
s872682695 | p00534 | C |
#include <iostream>
#include <vector>
#include <cstdio>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
long int dp [1000] [1000];//??´????????\??????
int n, m;
int d[1000], c[1000];//?????¢?????????
long int func(int place, int date){
if (place == n){
return 0;
}
else if (!dp[place][date]){
if ((n - place) > (m - date))
dp[place][date] = LONG_MAX;
else {
long int a = func(place + 1, date + 1) + d[place] * c[date], b = func(place, date + 1);
dp[place][date] = MIN(a,b);
}
for (int i = 0; date >= i; i++){
dp[place][i] = dp[place][date];
}
}
return dp[place][date];
}
int main(){
scanf("%d %d", &n, &m);
for (int i = 0; n > i; i++) scanf("%d", &d[i]);
for (int i = 0; m > i; i++) scanf("%d", &c[i]);
printf("%d\n", func(0, 0));
return 0;
} | main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s985564722 | p00534 | C | #include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
long long int dp[1001][1001];
int main(void)
{
int N,M,i,j,D[1001],C[1001];
scanf("%d %d", &N, &M);
for (i = 1; i <= N; i++)
{
scanf("%d", &D[i]);
}
for (j = 1; j <= M; j++)
{
scanf("%d", &C[j]);
}
memset(dp, 0x7f, sizeof(dp));
for (i = 0; i <= N; i++)
{
for (j = i; j <= M; j++)
{
if (i == 0)
{
dp[i][j] = 0;
}
else
{
dp[i][j] = min(dp[i][j - 1], dp[i - 1][j - 1] + D[i] * C[j]);
}
}
}
printf("%d\n", dp[N][M]);
return 0;
} | main.c:2:9: fatal error: algorithm: No such file or directory
2 | #include<algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s749043955 | p00534 | C | #include <stdio.h>
#include <limits.h>
typedef signed long long slolo;
int N, M, D[1001], C[1001];
slolo min, map[1001][1001];
slolo a(int i, int j, slolo tired) {
if (i == N) {
if (min > tired) min = tired;
return tired;
}
if ((M-j) < (N-i)) return LONG_MAX;
if (map[i][j] != -1) {
return a(N,j,tired+map[i][j]);
}
slolo b, c;
b = a(i+1, j+1, tired+D[i]*C[j]);
c = a(i, j+1, tired);
/*
if (i == 1 && j == 1) printf("%lld\n", b<c?b:c-tired);
map[i][j] = b<c?b:c - tired;
*/
return b<c?b:c;
}
int main() {
int i, j;
min = LONG_LONG_MAX;
scanf("%d%d", &N, &M);
for (i=0; i < N ;i++) {
for (j=0; j < M ;j++) map[i][j] = -1;
scanf("%d", &D[i]);
}
for (i=0; i < M ;i++) scanf("%d", &C[i]);
a(0,0,0);
printf("%lld\n", min);
return 0;
} | main.c: In function 'main':
main.c:29:15: error: 'LONG_LONG_MAX' undeclared (first use in this function); did you mean 'LLONG_MAX'?
29 | min = LONG_LONG_MAX;
| ^~~~~~~~~~~~~
| LLONG_MAX
main.c:29:15: note: each undeclared identifier is reported only once for each function it appears in
|
s754332346 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int *D = new int[N+1]; //距離
int *C = new int[M+1]; //日にち
int dp[N+1][M+1];
for(int i=1;i < N+1;i++)cin >> D[i];
for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:41: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている
| ^
a.cc: In function 'int main()':
a.cc:17:41: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s925904395 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int *D = new int[N+1]; //距離
int *C = new int[M+1]; //日にち
int dp[N+1][M+1];
for(int i=1;i < N+1;i++)cin >> D[i];
for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:41: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている
| ^
a.cc: In function 'int main()':
a.cc:17:41: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++)cin >> C[i]; //正しく値は代入されている
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s418562716 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int *D = new int[N+1];
int *C = new int[M+1];
int dp[N+1][M+1];
for(int i=1;i < N+1;i++)cin >> D[i];
for(int i=1;i < M+1;i++)cin >> C[i];
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:41: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++)cin >> C[i];
| ^
a.cc: In function 'int main()':
a.cc:17:41: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++)cin >> C[i];
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s107606942 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int *D = new int[N+1];
int *C = new int[M+1];
int dp[N+1][M+1];
for(int i=1;i < N+1;i++)cin >> D[i];
for(int i=1;i < M+1;i++)cin >> C[i];
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:41: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++)cin >> C[i];
| ^
a.cc: In function 'int main()':
a.cc:17:41: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++)cin >> C[i];
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s341341344 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int *D = new int[N+1];
int *C = new int[M+1];
int dp[N+1][M+1];
for(int i=1;i < N+1;i++){cin >> D[i];}
for(int i=1;i < M+1;i++){cin >> C[i];}
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:43: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++){cin >> C[i];}
| ^
a.cc: In function 'int main()':
a.cc:17:43: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++){cin >> C[i];}
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s995632482 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int D[N+1];
int C[M+1];
int dp[N+1][M+1];
for(int i=1;i < N+1;i++){cin >> D[i];}
for(int i=1;i < M+1;i++){cin >> C[i];}
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:43: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++){cin >> C[i];}
| ^
a.cc: In function 'int main()':
a.cc:17:43: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++){cin >> C[i];}
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s040101946 | p00534 | C++ | #include <iostream>
#include<algorithm>
#define INF 100000
using namespace std;
int main(void){
int N,M;
cin >> N >> M;
int D[N+1];
int C[M+1];
int dp[N+1][M+1];
for(int i=1;i < N+1;i++){cin >> D[i];}
for(int i=1;i < M+1;i++){cin >> C[i];}
for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
for(int i = 1;i < N+1;i++){ dp[i][0] = INF;}
for(int i = 1;i < N+1;i++){
for(int j = 1;j < M+1;j++){
dp[i][j] = min((D[i] * C[j] + dp[i-1][j-1]),dp[i][j-1]);
}
}
cout << dp[N][M] << endl;
return 0;
}
| a.cc:17:43: error: extended character is not valid in an identifier
17 | for(int i=1;i < M+1;i++){cin >> C[i];}
| ^
a.cc: In function 'int main()':
a.cc:17:43: error: '\U00003000' was not declared in this scope
17 | for(int i=1;i < M+1;i++){cin >> C[i];}
| ^~
a.cc:22:19: error: 'i' was not declared in this scope
22 | for(int i = 0;i < M+1;i++){ dp[0][i] = 0;}
| ^
|
s652394514 | p00534 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF INT_MAX
#define rep(i,n) for(int i =0;i<n;i++)
using namespace std;
typedef long long int ll;
int main(){
int n,m;
cin >> n>> m;
vector<int> c(m), d(n);
rep(i, n) cin >> d[i];
rep(i, m) cin >> c[i];
int dp[m-n+1][n+1];//???????????°?????\??????????????´????°?
rep(i, m-n+1) dp[i][0] = 0;
for(int i =1 ; i <= n ; i++) dp[0][i] = dp[0][i-1]+d[i-1]*c[i-1];
for(int i=1;i<m-n+1;i++){
for (int j=1 ; j<=n; j++) {
dp[i][j] = min(dp[i-1][j],dp[i][j-1]+c[i+j-1]*d[j-1]);
}
}
rep(i, m-n+1){
rep(j, n+1){
cout << dp[i][j]<<"|";
}
cout << endl;
}
rep(i, n) cout << d[i]<<" ";
cout << endl;
rep(i, m) cout << c[i]<<" ";
cout << endl;
int ans = INF;
rep(i, m-n+1) ans = min(ans,dp[i][n]);
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:12:13: error: 'INT_MAX' was not declared in this scope
12 | #define INF INT_MAX
| ^~~~~~~
a.cc:42:15: note: in expansion of macro 'INF'
42 | int ans = INF;
| ^~~
a.cc:12:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
11 | #include <map>
+++ |+#include <climits>
12 | #define INF INT_MAX
|
s420190661 | p00534 | C++ | #include<bits/stdc++.h>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
const int IINF = INT_MAX;
int N,M,D[1002],C[1002],dp[1002][1002];
int main(){
cin >> N >> M;
rep(i,N) cin >> D[i];
rep(i,M) cin >> C[i];
rep(i,M+1) rep(j,N+1) dp[i][j] = IINF;
dp[0][0] = 0;
rep(day,M){
rep(city,N){
if( dp[day][city] == IINF ) continue;
dp[day+1][city] = min(dp[day+1][city],dp[day][city]);
dp[day1+1][city+1] = min(dp[day+1][city+1],dp[day][city]+D[city]*C[day]);
}
}
int mini = IINF;
rep(i,M+1) mini = min(mini,dp[i][N]);
cout << mini << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:21:10: error: 'day1' was not declared in this scope; did you mean 'day'?
21 | dp[day1+1][city+1] = min(dp[day+1][city+1],dp[day][city]+D[city]*C[day]);
| ^~~~
| day
|
s852975276 | p00534 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
using namespace std;
#define INF INT_MAX;
int n,m;
vector<int> d;
vector<int> c;
vector< vector<int> > dp;
void dfs(int nisu,int shi,int hiro){
if( dp[shi][nisu] == INF ){
dp[shi][nisu] = min(dp[shi][nisu-1],hiro);
if(m-nisu>n-shi) dfs(nisu+1,shi,hiro);
dfs(nisu+1,shi+1,hiro+c[nisu]*d[shi]);
}
}
int main (){
cin >>n>>m;
d.resize(n);
c.resize(m);
dp.resize(n+1);
for(int i=0;i<=n;i++){
dp[i].resize(m+1);
for(int j=0;j<m;j++) dp[i][j] = INF;
}
for(int i=0;i<n;i++) cin >> d[i];
for(int i=0;i<m;i++) cin >> c[i];
dfs(0,0,0);
cout << dp[n][m]<<endl;
return 0;
} | a.cc: In function 'void dfs(int, int, int)':
a.cc:13:28: error: expected primary-expression before ')' token
13 | if( dp[shi][nisu] == INF ){
| ^
|
s492566819 | p00534 | C++ | #include <iostream>
#include <algorithm>
#define INF (2 << 28)
using namespace std;
int N, M, d[1000], c[1001], dp[1001][1001];
int rec(int now, int day) {
if(now == N) return 0;
if(day > M) return INF;
if(~dp[now][day]) return dp[now][day];
return dp[now][day] = min(rec(now, day + 1), rec(now + 1, day + 1) + d[now] * c[day]);
}
int main() {
cin >> N >> M;
for(int i = 0; i < N; i++) cin >> d[i];
for(int i = 0; i < M; i++) cin >> c[i + 1];
memset(dp, -1, sizeof(dp));
cout << rec(0, 1) << endl;
} | a.cc: In function 'int main()':
a.cc:23:5: error: 'memset' was not declared in this scope
23 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <algorithm>
+++ |+#include <cstring>
3 | #define INF (2 << 28)
|
s631828551 | p00534 | C++ | 11 21
28
558
915
253
963
539
686
300
665
653
661
637
92
985
880
338
83
846
227
42
598
575
560
184
307
670
909
682
465
73
200
712 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 11 21
| ^~
|
s210795825 | p00534 | C++ | // JOI14-quest4.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
int dp[1001][1001] = { 0 };
int main(void)
{
int city_number, day, distance[1001], weather[1001];
scanf_s("%d %d", &city_number, &day);
for (int i = 0; i < city_number; i++) {
scanf_s("%d", &distance[i]);
}
for (int i = 0; i < day; i++) {
scanf_s("%d", &weather[i]);
}
dp[0][0] = 1;
for (int i = 0; i <= day; i++) {
for (int j = 0; j <= city_number; j++) {
if (dp[i][j] != 0) {
if (dp[i + 1][j] == 0) {
dp[i + 1][j] = dp[i][j];
}
else {
if (dp[i + 1][j] > dp[i][j]) {
dp[i + 1][j] = dp[i][j];
}
}
if (j < city_number) {
if (dp[i + 1][j + 1] == 0) {
dp[i + 1][j + 1] = dp[i][j] + (weather[i] * distance[j]);
}
else {
if (dp[i + 1][j + 1] > dp[i][j] + (weather[i] * distance[j])) {
dp[i + 1][j + 1] = dp[i][j] + (weather[i] * distance[j]);
}
}
}
}
}
}
printf("%d\n", dp[day][city_number] - 1);
return 0;
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
13 | scanf_s("%d %d", &city_number, &day);
| ^~~~~~~
| scanf
|
s192711532 | p00534 | C++ | #include <bits/stdc++.h>
using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);} | a.cc:2:30: error: expected initializer before '.' token
2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| ^
a.cc:2:33: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:70: error: 'i' was not declared in this scope
2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| ^
a.cc:2:113: error: 'i' was not declared in this scope
2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| ^
a.cc:2:202: error: 'i' was not declared in this scope
2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| ^
a.cc:2:220: error: 'j' was not declared in this scope
2 | using namespace std;int N,M,i.j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;){cin>>D[i++];}vector<int>C(M);for(i=0;i<N;){cin>>D[i++];}vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| ^
|
s428852493 | p00534 | C++ | 1
2
#include <bits/stdc++.h>
using namespace std;int N,M,i,j;main(){cin>>N>>M;vector<int>D(N);for(i=0;i<N;i++){cin>>D[i];}vector<int>C(M);for(i=0;i<N;i++){cin>>D[i];}vector<vector<int> >dp(M+1,vector<int>(N+1,(1<<30)));dp[0][0]=0;for(i=1;i<=M;i++){for(j=0;j<=N;j++){if(j==0){dp[i][j]=dp[i-1][j];}else{dp[i][j]=min(dp[i-1][j],dp[i-1][j-1]+C[i-1]*D[j-1]);}}}printf("%d\n",dp[M][N]);}
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:4:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| |
s354811874 | p00534 | C++ | #include <bits/stdc++.h>
#define R(i,n) for(int i=0;i<n;i++)
using namespace std;
main(){
int N,M,i,j;
cin>>N>>M;
vector<int>D(N);
vector<int>C(M);
R(i,N){cin>>D[i];}
R(i,M){cin>>C[i];}
vector<vector<int> >dp(M+1,vector<int>(N+1,1<<30));dp[0][0]=0;
R(i,M){R(0,N+1){
if(j==0){dp[i+1][j]=dp[i][j];}
else{dp[i+1][j]=min(dp[i][j],dp[i][j-1]+C[i]*D[j-1]);}}}
cout<<dp[M][N]<<endl;
return 0;} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:12:10: error: expected unqualified-id before numeric constant
12 | R(i,M){R(0,N+1){
| ^
a.cc:2:24: note: in definition of macro 'R'
2 | #define R(i,n) for(int i=0;i<n;i++)
| ^
a.cc:12:10: error: expected ';' before numeric constant
12 | R(i,M){R(0,N+1){
| ^
a.cc:2:24: note: in definition of macro 'R'
2 | #define R(i,n) for(int i=0;i<n;i++)
| ^
a.cc:12:10: error: lvalue required as left operand of assignment
12 | R(i,M){R(0,N+1){
| ^
a.cc:2:24: note: in definition of macro 'R'
2 | #define R(i,n) for(int i=0;i<n;i++)
| ^
a.cc:2:31: error: expected ')' before ';' token
2 | #define R(i,n) for(int i=0;i<n;i++)
| ~ ^
a.cc:12:8: note: in expansion of macro 'R'
12 | R(i,M){R(0,N+1){
| ^
a.cc:12:10: error: lvalue required as increment operand
12 | R(i,M){R(0,N+1){
| ^
a.cc:2:32: note: in definition of macro 'R'
2 | #define R(i,n) for(int i=0;i<n;i++)
| ^
|
s427010940 | p00534 | C++ | #include <cstdio>
#define k 1024
#define r(i,a) for(int i=1;i<=a;i++)
#define s(a) scanf("%d",&a);
#define m(a,b) a<b?a:b
int n,m,c[k],d[k],p[k];
int main(){
s(n),s(m);
r(i,n)s(c[i])
r(i,m)s(d[i])
r(i,n)p[i]=1<<30;
p[1]=0;
r(i,m)r(j,n)p[n-j]=m(p[n-j],p[n-j-1]+c[i]*d[j]);
printf("%d\n",p[n]);
} | a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before ',' token
8 | s(n),s(m);
| ^
|
s657034547 | p00534 | C++ | #include <cstdio>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",&a);
#define m(a,b) a<b?a:b
int w,n,m,c[k],d[k],p[k];
int main(){
s(n)s(m)
r(n)s(d[i])
r(m)s(c[i])
r(n+1)p[i]=1<<29;
p[0]=0;
r(m*n)w=n-i%n,p[n-j]=m(p[w],p[w-1]+c[i/n]*d[w-1]);
printf("%d\n",p[n]);
} | a.cc: In function 'int main()':
a.cc:13:27: error: 'j' was not declared in this scope
13 | r(m*n)w=n-i%n,p[n-j]=m(p[w],p[w-1]+c[i/n]*d[w-1]);
| ^
|
s154288363 | p00534 | C++ | #include <cstdio>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",&a);
#define m(a,b) a<b?a:b
w,n,m,c[k],d[k],p[k];
main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);} | a.cc:6:1: error: 'w' does not name a type
6 | w,n,m,c[k],d[k],p[k];
| ^
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^~~~
a.cc: In function 'int main()':
a.cc:7:10: error: 'n' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:4:26: note: in definition of macro 's'
4 | #define s(a) scanf("%d",&a);
| ^
a.cc:7:14: error: 'm' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:4:26: note: in definition of macro 's'
4 | #define s(a) scanf("%d",&a);
| ^
a.cc:7:22: error: 'd' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:4:26: note: in definition of macro 's'
4 | #define s(a) scanf("%d",&a);
| ^
a.cc:7:33: error: 'c' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:4:26: note: in definition of macro 's'
4 | #define s(a) scanf("%d",&a);
| ^
a.cc:7:44: error: 'p' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:7:53: error: 'p' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:7:66: error: 'w' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:7:93: error: 'c' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:5:18: note: in definition of macro 'm'
5 | #define m(a,b) a<b?a:b
| ^
a.cc:7:100: error: 'd' was not declared in this scope
7 | main(){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
a.cc:5:18: note: in definition of macro 'm'
5 | #define m(a,b) a<b?a:b
| ^
|
s117386646 | p00534 | C++ | #include <cstdio>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",&a);
#define m(a,b) a<b?a:b
int n,m,c[k],d[k],p[k];main(w){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);} | a.cc:6:28: error: expected constructor, destructor, or type conversion before '(' token
6 | int n,m,c[k],d[k],p[k];main(w){s(n)s(m)r(n)s(d[i])r(m)s(c[i])r(n+1)p[i]=1e9;p[0]=0;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);printf("%d\n",p[n]);}
| ^
|
s297296279 | p00534 | C++ | #include <iostream.h>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) cin>>*a;
#define m(a,b) a<b?a:b
int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i+1]=1e9;r(m*n)w=n-i%n,p[w]=m(p[w],p[w-1]+c[i/n]*d[w-1]);cout<<p[n]<<endl;} | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s239417465 | p00534 | C++ | #import<stdio>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a<b?a:b
int w,n,m,c[k],d[k],p[k];main(){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio>
| ^~~~~~
a.cc:1:8: fatal error: stdio: No such file or directory
1 | #import<stdio>
| ^~~~~~~
compilation terminated.
|
s359728639 | p00534 | C++ | #import<cstdio>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a<b?a:b
main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
a.cc:6:5: error: expected constructor, destructor, or type conversion before '(' token
6 | main(w,n,m,c[k],d[k],p[k]){s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^
|
s762984768 | p00534 | C++ | #import<cstdio>
#define k 1024
#define r(a) for(int i=0;i<a;i++)
#define s(a) scanf("%d",a);
#define m(a,b) a<b?a:b
int w,n,m,c[k],d[k],p[k];main{s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<cstdio>
| ^~~~~~
a.cc:6:26: error: 'main' does not name a type
6 | int w,n,m,c[k],d[k],p[k];main{s(&n)s(&m)r(n)s(d+i)r(m)s(c+i)r(n)p[i]=1e9;r(m*n)w=i%n,p[w]=m(p[w],p[w+1]+c[i/n]*d[n-w-1]);printf("%d\n",p[0]);}
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.