domingo, 23 de junio de 2013

Codeforces Round #189

That was a bad Code Forces Round, I only solved the easy problem, the A.

Here is my solution.
int main() {
  int n;
  scanf("%d", &n);

  while(true) {
    bool sw = true;

    if(n%1000 == 144) {
      n /= 1000;
      sw = false;
    }

    if(n%100 == 14) {
      n /= 100;
      sw = false;
    }

    if(n%10 == 1) {
      n /= 10;
      sw = false;
    }

    if(sw)
      break;
  }

  if(n == 0)
    printf("YES\n");
  else
    printf("NO\n");

  return 0;
}
Fine, to day will be a long day, cause less one hour is the June Cook-Off and later the 2th Online Programming Contest of Bolivia.

Bye ...

1 comentario:

  1. Caesars casino is a legendary model that has repeatedly appeared in Hollywood films. As such, it's no marvel players can find huge assortment of 1xbet slots and table video games. On high of that, you are automatically half of|part of} the Caesars Rewards program. You get five playing cards dealt and should determine how many of} to carry earlier than drawing.

    ResponderEliminar