Submission #1167000

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11670002025-03-15 02:27:31adriannokTravelling Merchant (APIO17_merchant)C++20
0 / 100
1095 ms5696 KiB
#include <bits/stdc++.h>
#define sooth true
#define untrue false
using namespace std;
const int inf = 1e9 * 2;
int Nbuffer;
struct edge
{
int u, t;
edge(int _u, int _t) : u(_u), t(_t) {}
};
int N, M, K;
vector< vector< vector<int64_t> > > market;
vector< vector<edge> > adj;
vector<bool> beheld;
int64_t dfs ( int i, vector<int> &way, int64_t length, bool cycle = untrue )
{
int64_t maxv = 0;
if( cycle )
{
for(int i = 0; i < K; ++i)
for(int j = 0; j < (int)way.size(); ++j)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

merchant.cpp: In function 'int main()':
merchant.cpp:63:35: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type*' {aka 'long int*'} [-Wformat=]
   63 |                         scanf("%lld %lld", &mrkt[0], &mrkt[1]);
      |                                ~~~^
      |                                   |
      |                                   long long int*
      |                                %ld
merchant.cpp:63:40: warning: format '%lld' expects argument of type 'long long int*', but argument 3 has type '__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type*' {aka 'long int*'} [-Wformat=]
   63 |                         scanf("%lld %lld", &mrkt[0], &mrkt[1]);
      |                                     ~~~^
      |                                        |
      |                                        long long int*
      |                                     %ld
merchant.cpp:72:20: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int64_t' {aka 'long int'} [-Wformat=]
   72 |         printf("%lld\n", dfs(0, way, 0));
      |                 ~~~^     ~~~~~~~~~~~~~~
      |                    |        |
      |                    |        int64_t {aka long int}
      |                    long long int
      |                 %ld
merchant.cpp:57:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   57 |         scanf("%d %d %d", &N, &M, &K);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
merchant.cpp:63:30: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   63 |                         scanf("%lld %lld", &mrkt[0], &mrkt[1]);
      |                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
merchant.cpp:66:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   66 |                 int u, v, t; scanf("%d %d %d", &u, &v, &t);
      |                              ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...