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 | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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://codeforces.me/contest/1759/problem/E and my solution is this: https://codeforces.me/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://codeforces.me/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://codeforces.me/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 |
---|