Submission #465954

#TimeUsernameProblemLanguageResultExecution timeMemory
465954Alen777Game (eJOI20_game)C++14
0 / 100
1 ms204 KiB
#include <iostream> #include <string> #include <iomanip> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <cmath> #include <algorithm> #include <cstring> using namespace std; #define ll long long #define ull unsigned ll #define pb push_back #define mpr make_pair #define lb lower_bound #define ld long double #define ub upper_bound int n, m; void solve() { cin >> n >> m; int ans = 0; for (int i = 0; i < n + 1; i++) { string s; cin >> s; for (int j = 0; j < s.size(); j++) { if (s[j] == '0') { ans++; } } } for (int i = 0; i < n; i++) { string s; cin >> s; for (int j = 0; j < s.size(); j++) { if (s[j] == '0') { ans++; } } } cout << (-1) * (ans - 1) << endl; } int main() { /*cout.setf(ios::fixed | ios::showpoint); cout.precision(6);*/ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; //cin >> t; while (t--) { solve(); } return 0; }

Compilation message (stderr)

game.cpp: In function 'void solve()':
game.cpp:30:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |         for (int j = 0; j < s.size(); j++) {
      |                         ~~^~~~~~~~~~
game.cpp:39:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   39 |         for (int j = 0; j < s.size(); j++) {
      |                         ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...