Submission #779244

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7792442023-07-11 09:27:32anhphantBitaro’s Party (JOI18_bitaro)C++17
0 / 100
6 ms12116 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void pre_setting() {
srand(time(NULL));
ios_base :: sync_with_stdio(0);
cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("birato.inp", "r", stdin);
freopen("birato.out", "w", stdout);
#endif // ONLINE_JUDGE
}
namespace subtask2 {
int N, M, Q, is_visited[100007], longest_path[100007], T, Y, C[100007];
vector<int> GR[100007], invGR[100007];
vector<int> topo_order;
void init() {
cin >> N >> M >> Q;
for(int i = 1, s, e; i <= M; i++) {
cin >> s >> e;
GR[s].push_back(e);
invGR[e].push_back(s);
}
}
void topo_dfs(int u) {
is_visited[u] = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

bitaro.cpp: In function 'void subtask2::solve()':
bitaro.cpp:53:59: warning: overflow in conversion from 'double' to 'int' changes value from '-1.0e+18' to '-2147483648' [-Woverflow]
   53 |             for(int i = 0; i <= N; i++) longest_path[i] = -1e18;
      |                                                           ^~~~~
bitaro.cpp: In function 'void subtask3::vlist_construct()':
bitaro.cpp:108:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  108 |                 while(pl < vlist[u].size() || pr < vlist[v].size()) {
      |                       ~~~^~~~~~~~~~~~~~~~~
bitaro.cpp:108:50: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  108 |                 while(pl < vlist[u].size() || pr < vlist[v].size()) {
      |                                               ~~~^~~~~~~~~~~~~~~~~
bitaro.cpp:110:28: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  110 |                     if (pl < vlist[u].size() && vlist[u][pl].second + 1 > vlist[v][pr].second) {
      |                         ~~~^~~~~~~~~~~~~~~~~
bitaro.cpp: In function 'void subtask3::solve()':
bitaro.cpp:161:39: warning: overflow in conversion from 'double' to 'int' changes value from '-1.0e+18' to '-2147483648' [-Woverflow]
  161 |                     longest_path[i] = -1e18;
      |                                       ^~~~~
bitaro.cpp:172:21: warning: unused variable 'idxC' [-Wunused-variable]
  172 |                 int idxC = 1;
      |                     ^~~~
bitaro.cpp:183:21: warning: unused variable 'hope' [-Wunused-variable]
  183 |                 int hope = -1;
      |                     ^~~~
bitaro.cpp: In function 'void pre_setting()':
bitaro.cpp:10:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |     freopen("birato.inp", "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
bitaro.cpp:11:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     freopen("birato.out", "w", stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...