Submission #999025

#TimeUsernameProblemLanguageResultExecution timeMemory
999025vjudge1Konstrukcija (COCI20_konstrukcija)C++17
15 / 110
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int k; cin >> k; if (1 <= k < 500){ int n = k + 3; vector<pair<int, int>> edges; for (int i = 2; i < n; i ++){ edges.push_back({1, i}); edges.push_back({i, n}); } cout << n << " " << edges.size() << endl; for (auto [u, v] : edges) cout << u << " " << v << endl; } }

Compilation message (stderr)

konstrukcija.cpp: In function 'int main()':
konstrukcija.cpp:8:16: warning: comparison of constant '500' with boolean expression is always true [-Wbool-compare]
    8 |     if (1 <= k < 500){
      |         ~~~~~~~^~~~~
konstrukcija.cpp:8:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
    8 |     if (1 <= k < 500){
      |         ~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...