Блог пользователя maximaxi

Автор maximaxi, история, 9 лет назад, По-английски

Could anyone help me out with Permutation Encryption?

The following is my code so far. pastebin.com/DDfN5Syt

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I had a lot of problems with this. I don't know if this helps, but my answer result in WA, when using for(int i = 0; i<n; i++){ scanf("%d", tmp); // code... } scanf("\n"); string line; getline(cin, line); // code...

but when I changed "scanf("\n");" with "cin.ignore();" it suddenly worked. I don't know why, and I don't know if this helps you. I suppose it had a problem with the compiler of the judge or a weird test case that made something funny. Hope it helps... 4 months later.