We will hold AtCoder Beginner Contest 347.
- Contest URL: https://atcoder.jp/contests/abc347
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240330T2100&p1=248
- Duration: 100 minutes
- Writer: MMNMM, nok0, m_99, chokudai, Nyaan
- Tester: physics0523, kyopro_friends
- Rated range: ~ 1999
- The point values: 100-200-350-400-500-525-600
We are looking forward to your participation!









I hope I can stop dropping rated this round!
GL&HF.Hope my rating do not drop
My submission for problem C gives WA for only 1 testcase — LINK.
I can't figure out what's wrong in this,any help is appreciated.
same issue can anyone help
include
include
include
using namespace std;
int main() { ios::sync_with_stdio(false); cin.tie(nullptr);
int N; long long A, B; cin >> N >> A >> B; vector<long long> D(N); for (int i = 0; i < N; ++i) { cin >> D[i]; } long long week_length = A + B; // Calculate the minimum and maximum days later vector<long long> temp; for (int i = 0; i < N; ++i) { long long days_later = D[i] % week_length; if (days_later == 0) { days_later = week_length; } temp.push_back(days_later); } sort(temp.begin(), temp.end()); long long mini = temp[0]; long long maxi = temp[N - 1]; // Check if the difference between mini and maxi is less than or equal to A bool flag = (maxi - mini < A); if (flag) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0;} this is my code
Wants more diverse presentation? Use Markdown.
same issue dude, I missed both C and D today by just 1 test case each, which is the same test case as what you got wrong. I have no idea what could go wrong, spent 1 hr into debugging but of no use :(
Someone please help.
I think that the problem with your solution is that you didn't take into account that, even after first taking the remainder modulo $$$(A + B)$$$, the array can still be shifted for better adjustment.
To illustrate this with an example, try the hack:
2 5 5
1 7
The correct answer should be "Yes", but your solution outputs "No". The reason is, after taking the remainder, the array is still $$$[1, 7]$$$, but this gap of length $$$6 \gt A = 5$$$ between $$$1$$$ and $$$7$$$ means we can still shift the dates so that the first plan is on Day 5 and the second plan is on Day 11, which still works.
I reckon that anyone else failing to pass one or two test cases might be having this problem, too.
Thanks,I have never thouht of that and WA on 01_test_28.txt
Answer should be yes.
was able to solve till E, what's wrong with 1 testcase in C? can anybody tell that testcase?
I'd like to know too. it's 01_test_28.txt case
same,my code also fails on it.
Here is my submission
I think the test cases are weak because I was also getting only 1 test case wrong for wrong solution.
Problem F is almost same with https://www.luogu.com.cn/problem/P3625
problem C ????????????
what was the last test case in problem D, I spent more than half hour but was unable to figure out that test case
https://atcoder.jp/contests/abc347/submissions/51845269
any help for C test case?
try this: 2 5 5 1 7
You can actually pass F without considering those two cases:
If you comment those in the std you can still get an AC. Weak tests.
Does greedy not work for D?
https://atcoder.jp/contests/abc347/submissions/51871701
You need to apply one more check, that the numbers you have constrcuted have popcounts equal to a and b respectively, As for both num1 and num2 too you have constraint of being <2^60
Think of a case when a = 60 b = 60 and you have popcount of c = 60
In this case you will greedilly keep 30 1's in num1 and other 30 1's in num2, This will satisfy xor condition, but you don't have 60 popcounts in num1 and num2
it works https://atcoder.jp/contests/abc347/submissions/52433050
I must say problem C is very perfect
can u explain this please https://mirror.codeforces.com/blog/entry/127694?#comment-1141143
apologize for my impulse.
This comment was deleted.
an accepted submission
data:
ans: 80+77+74=231
my output is right while I did't pass the problem. The mentioned submission got wrong output.
In addition, the problem F is also the same as a problem in APIO2009. We found that the solution of that problem cannot be accepted in this. The problem link in a Chinese site.
I've just known that there's a problem of APIO which is almost the same as this one. I passed that problem.
...well, I hacked my submission just now. maybe the tests of F are weak but correct.
Good contest. Got 1 of WAs in C because got used to printing "YES" in cfs and atcoder requires 'Yes' :p
My pC also got 1 subtask WA at 01_test_28.txt ; Wondering what's the problem of my idea ; Actually I don't even think we need O(NlogN) to solve this ; Can't we just simply calculate the max and min value of D_i%(A+B) for all elements in D ; And consider the "max-min < A" one as "Yes" case?
lets say after doing modulo operation our array becomes 0 1 8 and a = 5, b= 5. basically we cant just rely on the the length of holidays we also have to factor in the days on which we can plan our events. in above tc max-min will give no. but if we think of today as day 4 then ans is yes
can u explain this please https://mirror.codeforces.com/blog/entry/127694?#comment-1141143
What was C? I kept getting WA on 1 testcase, also I feel D>E.
My Solution for E !!
Can someone help me understand why my solution for C is wrong. Below is what I did.
For this test case
The answer is Yes but you output No
Can anyone Give Counter Test for C https://atcoder.jp/contests/abc347/submissions/51861296 it is just falling on 2 test case
a possible hack for problem F:
the answer is 619.
(i1, i2, i3, i4, i5, i6) = (1, 2, 3, 1, 4, 4).
hey sorry to ask, can you please check my submission and let me know what i am doing wrong
only checking the maximum and minimum values is not enough.
your solution is far from the right one. suggest you do read the Editorial.
thanks man also don't stay alone
I think the testdata of F is kind of weak.
The solution mentioned 6 situations, but I didn't check the 1st and 4th (three submatrices on [left, mid, right], [top, mid, bottom]), still got AC.
My submission
(the array
dp2[][]is useless)A hack data which my code can't pass:
Update: Here's what happened in my code.
Mr. Takahashi, could you please add my ranking when I click on the Show favs only to filter the ranking list . So that we can compare with our good friends. Just like the Codeforces.
you should follow yourself
why checking only
if(d[i - 1] + a + b - d[i] + 1 <= a){ flag = 1; }is sufficent ?what about the days at left of i-1 and to the right of i ?
how we will make sure that are also satisfied