ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1877. Bicycle Codes

Wrong Answer (C). Which reason?
Posted by exe-cute-er 8 Mar 2017 03:16
#include <stdio.h>

int main() {
  int a, b;

  scanf("%d %d", &a, &b);

  if (a % 2 == 0 || b % 2 != 0) {
    printf("YES");
  } else {
    printf("NO");
  }

  return 0;
}
Re: Wrong Answer (C). Which reason?
Posted by Aminul_cse15 19 Jul 2017 23:43
Posted by Deepto Shome Pritom 4 Feb 2017 21:06
Test 1:
Den's keys: 0001
            0000

           1st night   2nd night   3rd night  4th night  ... ... ...    All nights

bike's key 0001        0000        0001       0000                      -

bad man    0000        0001        0003       0004                      -

result     no          no          no         no                        no

Test 2:
Den's keys: 0002
            0001

           1st night   2nd night   3rd night  4th night  ... ... ...    All nights

bike's key 0002        0001        0002       0001                      -

bad man    0000        0001        0003       0004                      -

result     no          yes         no         no                        yes

In the first test all nights result is "no". That why in the first test result is no.



try to understand .. happy coding

Edited by author 19.07.2017 23:44