Halym2007's blog

By Halym2007, history, 9 hours ago, In English

If you know can you share.APIO(Asia-Pacific Informatic olympiad ).

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By Halym2007, history, 4 days ago, In English

In this problem Can you explain me sample test case?How That answer comes.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Halym2007, history, 4 weeks ago, In English

both code did same.what is the difference?

First one : 
set <int> s;
s.insert (1);s.insert (3);s.insert (5);
auto tr = s.lower_bound (2);
s.erase (tr);<-----------here
--------------------------
Second one : 
set <int> s;
s.insert (1);s.insert (3);s.insert (5);
auto tr = s.lower_bound (2);
s.erase (*tr);<-----------here

Full text and comments »

  • Vote: I like it
  • +40
  • Vote: I do not like it

By Halym2007, history, 3 months ago, In English

can you share your idea?

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it

By Halym2007, history, 4 months ago, In English

i trying to solve this problem.I tried my best I got 23 point(I got 1-st and 2-nd subtask).Can you share your idea for full score?

Full text and comments »

  • Vote: I like it
  • -12
  • Vote: I do not like it

By Halym2007, history, 4 months ago, In English

In this problem.I tried greedy solution.But It didn't pass.I tried but I didn't find anti-test for my solution? Can you give me anti test for this code?

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 5e5 + 5;
ll o, a[N], seg[N], sum;

int main () {
//	freopen("input.txt", "r", stdin);
	int n;
	cin >> n;
	for (int i = 1; i <= n; ++i) {
		cin >> a[i];
	}
	o++;
	seg[o] = a[1];
	for (int i = 2; i <= n; ++i) {
		sum = 0;
		int r;
		for (int j = i; j <= n; ++j) {
			sum += a[j];
			if (sum >= seg[o]) {
				r = j;
				break;
			}
		}
		if (sum >= seg[o]) {
			o++;
			seg[o] = sum;
			// i bilen r aralyk
			for (int j = i; j <= r; ++j) {
				if (seg[o] - a[j] >= seg[o - 1] + a[j]) {
					seg[o] -= a[j];
					seg[o - 1] += a[j];
				}
				else break;
			}
		}
		else {
			seg[o] += sum;
			break;
		}
		i = r;
	}
	cout << o << endl;
}

Full text and comments »

  • Vote: I like it
  • +13
  • Vote: I do not like it

By Halym2007, history, 5 months ago, In English

I'm trying to solve this problem about 3 days.Can you share your idea for subtasks.

Full text and comments »

  • Vote: I like it
  • +16
  • Vote: I do not like it

By Halym2007, history, 6 months ago, In English

Will Izho 2024 be offline?

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By Halym2007, history, 7 months ago, In English

If you has schedule or used to has schedule,Can you share?

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By Halym2007, history, 8 months ago, In English

In this problem?We should write time complexity O(N log2(N));But i didn't understand solution proof.

#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define ppb pop_back
#define sz size()
#define ss second
#define ff first
#define N 200001

using namespace std;

ll  _, x, n, a[N];


int main(){
	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> a[i];
	}
	vector <ll> v;
	v.pb(a[1]);
	for(int i = 2; i <= n; i++){
		auto t = lower_bound(v.begin(),v.end(),a[i]) - v.begin();
		if(t == v.sz) v.pb(a[i]);
		else{
			v[t] = a[i];
		}
	}
//	for(auto i : v) cout << i << ' ';
	cout << v.sz;
}

This code gets accepted.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Halym2007, history, 14 months ago, In English

how to participate info1cup????

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By Halym2007, history, 14 months ago, In English

my goal is to become master.

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it

By Halym2007, history, 15 months ago, In English

link of problem: 104052B - Lunchtime Fruits.i got 70 points but how to get 100 points.I read solution of problem but i didn't understand.Please help this problem to get 100 points

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By Halym2007, history, 16 months ago, In English

I'm going to participate. I'm interesting about who is going to parcipate?????

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By Halym2007, history, 18 months ago, In English

that doesn't matter junior

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By Halym2007, history, 18 months ago, In English

which problems should i solve.or link of questions

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Halym2007, history, 21 month(s) ago, In English

what is my wrong in my code. who can find my wrong please say me. [problem:https://codeforces.com/problemset/problem/916/B]. [submission:https://codeforces.com/contest/916/submission/157866266

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it