How can i submit solutions to the problems of Izho 2024. Also if anyone has problems of day 2 it would be really helpful if you shared it.
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Monotonic Stacks:
Segment Trees:
When to Choose:
Key Considerations:
In summary:
What do you think need to be changed ?
Before reading this blog i kindly ask you read the problem statement: https://vjudge.net/problem/UVA-714
I implemented a binary search solution for this problem and i am getting wrong answer verdict when i submitted.
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define rep(i,a,b) for (ll i = a; i < b; i++)
#define inf 1e18+1
using namespace std;
ll m,k;
ll p[505];
bool isvalid(ll guess){
ll ind = 0;
ll used = k;
ll curr = 0;
while (ind<m and used){
if (curr+p[ind]>=guess){
used--;
curr = 0;
}else{
curr+=p[ind];
ind++;
}
}
return ind==m;
}
void solve() {
cin>>m>>k;
ll s = 0;
rep(i,0,m) {
cin>>p[i];
s+=p[i];
}
ll b = -1;
for (ll i = s+1;i>=1;i/=2){
while (!isvalid(b+i)) b+=i;
}
// cout<<b<<"\n";
ll ind = 0;
ll used = k;
ll curr = 0;
while (ind<m and used){
if (curr+p[ind]>b){
used--;
curr = 0;
cout<<"/ ";
}else{
curr+=p[ind];
cout<<p[ind]<<" ";
ind++;
}
}
cout<<"\n";
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
cin >> t;
while (t--) {
solve();
}
return 0;
}
If you encounter any problems in my solution whether they are about logic or implementation, let me know.
Thanks in advance
Hi everyone. I was solving problem https://mirror.codeforces.com/contest/1759/problem/E and my solution is this: https://mirror.codeforces.com/contest/1759/submission/228398584
but unfortunately i failed test 3. can you help me to clarify which part of my submission is wrong
Normally how long it takes for atcoder to update ratings of contestant ?
(is it soo long)?
i was solving this problem and after making few submissions i thought now it would pass, but i got wrong answer on test two,cause 256th number differs :(
here is my submission: https://mirror.codeforces.com/contest/1736/submission/218110763
it says out of bounds on long long. how could this happen with the given constraints.
what's more i can't see that test-case. so, i wanted ask whether someone can help me for this one.
Hello everyone, i think most of you guys herd about https://mirror.codeforces.com/blog/entry/119110
can someone explain how to push the solution.in the instructions it is written push your solution, but didn't explain how and where?
I have learned basics of c++ and i can now solve some problems which are related to intuition, but i'm still not good at implementation stuff...
So, before learning data structures i found out that i have to learn STL Library of C++
Can someone suggest anything like how can i learn it and become comfortable with it and what should i do next?
Thanks in advance:)
You can downvote if you want, but i need advice :)
i was solving this problem
i got wrong answer many times(you can refer to my last submissions) on test 1, but when i checked myself with sample test-cases i got right answers.
I wonder why?
my last submission
can someone explain reason or give some hints , thanks in advance
Hi everyone, thank you for reading this blog. If you know c++ can you please keep reading to help me
problem: 1846C
i solved this problem in python, but i got runtime error on test 3 when i tried to do it using c++
i don't understand why i got runtime error on test 3. can somebody explain this to me
Thanks in advance
Name |
---|