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

Автор Mohamed_Rahal, история, 3 года назад, По-английски

UVA input format is very frustrating to deal with, or that what I see. For example this UVA 825 problem Anyone can help how to deal with this type of input format and other formats like not giving the number of testcases, the input ends by a newline and other things like those ? :)

Теги uva
  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

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

This is really annoying.
Maybe try to do
while(testCases--){ int W, N; cin >> W >> N; while(W--){//and so on} }

»
3 года назад, скрыть # |
 
Проголосовать: нравится +11 Проголосовать: не нравится

what about while(cin>>x)