QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#664763#7157. Bikes vs CarsWarinchai_s#Compile Error//C++14733b2024-10-21 22:13:062024-10-21 22:13:07

Judging History

你现在查看的是最新测评结果

  • [2024-10-21 22:13:07]
  • 评测
  • [2024-10-21 22:13:06]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
int c[505][505];
int b[505][505];
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n,w;cin>>n>>w;
    for(int i=0;i<n;i++){
        for(int j=0;j<i;j++){
            cin>>c[j][i];
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<i;j++){
            cin>>b[j][i];
        }
    }
    int rc=c[0][1];
    int rb=b[0][1];
    assert(rc+rb>=w);
    if(rc+rb<w){
        cout<<"NO\n";
        return 0;
    }
    cout<<(n-1)*2<<"\n";
    for(int i=0;i<n-1;i++){
        cerr<<i<<" "<<i+1<<" "<<rb<<"\n";
        cerr<<i<<" "<<i+1<<" "<<w-rc<<"\n";
    }
}
/*
4 5
1
1 1
1 1 1
4
4 4
4 4 4

*/

详细

cc1plus: error: ‘::main’ must return ‘int’