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

Автор Shayan, 2 недели назад, По-английски

Note: The text editorials will be provided by the authors of the round. This video tutorial acts as an additional resource for those who prefer video over text, not as a substitute for the text editorial.

2009A — Minimize!

Video

2009B — osu!mania

Video

2009C — The Legend of Freya the Frog

Video

2009D — Satyam and Counting

Video

2009E — Klee's SUPER DUPER LARGE Array!!!

Video

2009F — Firefly's Queries

Video

2009G — Yunli's Subarray Queries

Video
Разбор задач Codeforces Round 971 (Div. 4)
  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
10 дней назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

2009C — The Legend of Freya the Frog Why its not working with if else. ~~~~~ // this is code - int main(){ - int t; - cin >> t; - while(t--){ - int x, y, k; - cin >> x >> y >> k; - if (x > y){ - int a = (x + k — 1) / k; - cout << 2 * a — 1 << "\n"; - } - else{ - int b = (y + k — 1) / k; - cout << 2 * b << "\n"; - } - } - } - ~~~~~