Submission #941197

#TimeUsernameProblemLanguageResultExecution timeMemory
941197guymmkCluedo (IOI10_cluedo)C++14
Compilation error
0 ms0 KiB
#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 (stderr)

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/ccaPo8jo.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccKGZVMl.o:cluedo.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccaPo8jo.o: in function `main':
grader.c:(.text.startup+0x49): undefined reference to `Solve()'
collect2: error: ld returned 1 exit status