QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#412718#677. Koala GameASGA_RedSea#Compile Error//C++231.2kb2024-05-16 18:32:032024-05-16 18:32:04

Judging History

This is the latest submission verdict.

  • [2024-05-16 18:32:04]
  • Judged
  • [2024-05-16 18:32:03]
  • Submitted

answer

/**

                                    * بسم الله الرحمن الرحيم *

                ﴾ رَبِّ اشْرَحْ لِي صَدْرِي * وَيَسِّرْ لِي أَمْرِي * وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي * يَفْقَهُوا قَوْلِي ﴿

*/

/// author : "ASGA"

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;


int minValue(int n,int w){
    return 0;
}

int maxValue(int n,int w){
    return --n;
}

bool greaterValue(int n,int w){
    int b[n]{},r[n]{};
    b[0] = w - 1;
    playRound(b,r);
    return (r[0] != w);
}

void allValues(int n,int w,int& p[]){
    for(int i = 0;i < n;i++)p[i] = i + 1;
}


//signed main(){
//    ios_base::sync_with_stdio(0);cin.tie();
//
//    int n,m,k;cin >> n >> m >> k;
//    vector <vector <pair <int,int>>> a(n,vector <pair <int,int>> (k));
//    for(auto& i : a){
//        for(auto& [j,k] : i)cin >> j >> k;
//    }
//
//    vector <vector <pair <int,int>>> g(n + 1);
//    while(m--){
//        int u,v,w;cin >> u >> v >> w;
//        g[u].push_back({v,w});
//    }
//
//    ;
//
//    return 0;
//}

详细

implementer.cpp: In function ‘void grader()’:
implementer.cpp:138:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  138 |     fscanf(fin, "%d %d %d",&F,&G,&maxQueries);
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
implementer.cpp: In function ‘void runGame(int)’:
implementer.cpp:89:11: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   89 |     fscanf(fin,"%d %d",&N,&W);
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~
implementer.cpp:91:15: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   91 |         fscanf(fin,"%d",&P[i]);
      |         ~~~~~~^~~~~~~~~~~~~~~~
answer.code: In function ‘bool greaterValue(int, int)’:
answer.code:29:5: error: ‘playRound’ was not declared in this scope; did you mean ‘lround’?
   29 |     playRound(b,r);
      |     ^~~~~~~~~
      |     lround
answer.code: At global scope:
answer.code:33:33: error: declaration of ‘p’ as array of references
   33 | void allValues(int n,int w,int& p[]){
      |                                 ^
answer.code: In function ‘void allValues(...)’:
answer.code:34:23: error: ‘n’ was not declared in this scope
   34 |     for(int i = 0;i < n;i++)p[i] = i + 1;
      |                       ^
answer.code:34:29: error: ‘p’ was not declared in this scope
   34 |     for(int i = 0;i < n;i++)p[i] = i + 1;
      |                             ^