Submission #437803

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4378032021-06-27 06:53:20XBoRickieGame (IOI13_game)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long int int64;
typedef unsigned long long int uint64;
typedef std::pair<int, int> PII;
typedef std::vector<int> VI;
typedef std::vector<long long> VLL;
typedef std::vector<PII> VII;
typedef std::vector<VI> VVI;
#define FOR(i, j, k, in) for (int i = (j); i < (k); i += (in))
#define FORW(i, j, k, in) for (int i = (j); i <= (k); i += (in))
#define RFOR(i, j, k, in) for (int i = (j); i >= (k); i -= (in))
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.rbegin(), cont.rend()
#define sz(cont) int((cont).size())
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define IINF 0x3f3f3f3f
#define LLINF 1000111000111000111LL
#define PI 3.1415926535897932384626433832795
#define FastIO std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL);
#define hardio(name) freopen(name".inp","r",stdin), freopen(name".out","w",stdout);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

game.cpp: In function 'int main(int, char**)':
game.cpp:488:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int64*' {aka 'long long int*'} [-Wformat=]
  488 |             scanf("%I64d", &k);
      |                    ~~~~^   ~~
      |                        |   |
      |                        |   int64* {aka long long int*}
      |                        int*
      |                    %I64lld
game.cpp:493:25: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
  493 |             printf("%I64d\n", calculate(p, q, u, v));
      |                     ~~~~^     ~~~~~~~~~~~~~~~~~~~~~
      |                         |              |
      |                         int            long long int
      |                     %I64lld
game.cpp:477:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  477 |     scanf("%d%d%d", &r, &c, &n);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~
game.cpp:484:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  484 |         scanf("%d", &type);
      |         ~~~~~^~~~~~~~~~~~~
game.cpp:486:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  486 |             scanf("%d%d", &p, &q);
      |             ~~~~~^~~~~~~~~~~~~~~~
game.cpp:488:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  488 |             scanf("%I64d", &k);
      |             ~~~~~^~~~~~~~~~~~~
game.cpp:491:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  491 |             scanf("%d%d%d%d", &p, &q, &u, &v);
      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/ccg61UFV.o: in function `main':
game.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccgBcSrW.o:grader.c:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccgBcSrW.o: in function `main':
grader.c:(.text.startup+0x6b): undefined reference to `init'
/usr/bin/ld: grader.c:(.text.startup+0xd0): undefined reference to `calculate'
/usr/bin/ld: grader.c:(.text.startup+0x13e): undefined reference to `update'
collect2: error: ld returned 1 exit status