Submission #38379

#TimeUsernameProblemLanguageResultExecution timeMemory
38379daniel_02Bomb (IZhO17_bomb)C++14
0 / 100
436 ms2016 KiB
#include <bits/stdc++.h>



using namespace std;

char a;

int ans;

int main()
{
   int n, m;
   cin >> n >> m;
   for (int i = 0; i < n; i++)
   {
       scanf("\n");
       for (int j = 0; j < m; j++)
       {
           scanf("%c",&a);
           if (a == '1')ans++;
       }
   }
   cout << ans / 2;
}


Compilation message (stderr)

bomb.cpp: In function 'int main()':
bomb.cpp:17:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
        scanf("\n");
                   ^
bomb.cpp:20:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
            scanf("%c",&a);
                          ^
#Verdict Execution timeMemoryGrader output
Fetching results...