Submission #528089

#TimeUsernameProblemLanguageResultExecution timeMemory
528089aris12345678Wand (COCI19_wand)C++14
7 / 70
26 ms1704 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, m; scanf("%d %d", &n, &m); string s = ""; for(int i = 0; i < n; i++) s += '0'; for(int i = 0; i < m; i++) { int a, b; scanf("%d %d", &a, &b); s[a-1] = '1'; } cout << s << "\n"; return 0; }

Compilation message (stderr)

wand.cpp: In function 'int main()':
wand.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    6 |     scanf("%d %d", &n, &m);
      |     ~~~~~^~~~~~~~~~~~~~~~~
wand.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%d %d", &a, &b);
      |         ~~~~~^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...