Submission #941196

# Submission time Handle Problem Language Result Execution time Memory
941196 2024-03-08T09:25:12 Z guymmk Cluedo (IOI10_cluedo) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
using namespace std;
#define int long long
#define ll long long
#define endl "\n"
#define F first
#define S second
#define pb push_back
#define pop pop_back
#define pii pair<int,int>
#define all(x) x.begin(),x.end()
#define mustawa ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr)
#define mishari main
const int inf=1e9+7;
void usaco(string s){
    freopen((s + ".in").c_str(), "r", stdin);
    freopen((s + ".out").c_str(), "w", stdout);
}
void solve(){
    bool m[7]={},l[11]={},w[7]={};
    for(int i=1;i<=6;i++){
        for(int j=1;j<=10;j++){
            for(int k=1;k<=6;k++){
                if(m[i]||l[j]||w[k])continue;
                int x=Theory(i,j,k);
                if(x!=0){
                    if(x==1)m[i]=1;
                    else if(x==2)l[j]=1;
                    else w[k]=1;
                    continue;
                }
                return;
            }
        }
    }
}
//signed mishari() {
//    mustawa;
//    //usaco("whereami");
//    int t = 1;
//    //cin>>t;
//    while (t--)solve();
//}

Compilation message

cluedo.cpp: In function 'void usaco(std::string)':
cluedo.cpp:18:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |     freopen((s + ".in").c_str(), "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cluedo.cpp:19:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   19 |     freopen((s + ".out").c_str(), "w", stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cc0RUBqQ.o: in function `main':
grader.c:(.text.startup+0x49): undefined reference to `Solve()'
collect2: error: ld returned 1 exit status