这场cf,我败在了老奶奶身上。
就做出来一道题。还上分了。
A题,台灯。
十分钟就过了吧,470分。但是prime passed(预测试通过)。当时觉得完了,又是一场0题之路。
可是上分了。搞搞笑笑。
#include <iostream>
using namespace std;
int main() {
int t, n, m;
cin >> t;
while (t--) {
cin >> n >> m;
cout << (n * m + 1) / 2 << '\n';
}
}
B 老奶奶们,败在了不会用vector,string。清空数组,排序。都是自己手写的,耗费了大量的时间。
B. Maria Breaks the Self-isolation
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Maria is the most active old lady in her house. She was tired of sitting at home. She decided to organize a ceremony against the coronavirus.
She has nn friends who are also grannies (Maria is not included in this number). The ii-th granny is ready to attend the ceremony, provided that at the time of her appearance in the courtyard there will be at least aiai other grannies there. Note that grannies can come into the courtyard at the same time. Formally, the granny ii agrees to come if the number of other grannies who came earlier or at the same time with her is greater than or equal to aiai.
Grannies gather in the courtyard like that.
- Initially, only Maria is in the courtyard (that is, the initial number of grannies in the co