Блог пользователя pathetique

Автор pathetique, история, 3 месяца назад, По-английски

As a programmer, there have been countless times when I felt like giving up during my contest practice days. The frustration of not solving a problem or facing unexpected challenges can sometimes be overwhelming. During these tough moments, I found solace and strength in simple yet powerful motivational quotes.

These quotes were not just words; they were a source of energy that kept me going, pushing me to strive harder and not give up. Here are a few quotes that have profoundly impacted me:


// Source: https://usaco.guide/general/io #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--){ int n; cin >> n; string s; cin >> s; map<char,int> cnt; for(int i = 0;i < s.length();i++){ cnt[s[i]]++; } cout << min(n,cnt['A'])+min(n,cnt['B'])+min(n,cnt['C'])+min(n,cnt['D']) << endl; } }

Also, here is another good one:

#include <bits/stdc++.h>
#define f first
#define s second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
const ll mod = 1e9 + 7;
// cope counter = 2254
 
signed main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int t;
	cin >> t;
	while(t--) {
		int n, k;
		cin >> n >> k;
		int ans = 0, bk = 0;
		while(k > 0) {
			k -= n, ans++, bk ^= 1;
			if(bk) n--;
		}
		cout << ans << "\n";
	}
}

Insert_Username_Here

These quotes reminded me that every challenge is an opportunity to learn and grow. They helped me stay focused, keep pushing through difficult times, and eventually achieve success in my coding journey.

If you're looking for more motivational quotes to keep you inspired, I've compiled a collection on my website Inspiring Quotes You'll find not only motivational quotes but also quotes on various other topics that might resonate with you during your coding practice or any other challenges you face.

Remember, it's the small things, like a few words of encouragement, that can make a big difference. Keep coding, keep pushing, and most importantly, never give up!

  • Проголосовать: нравится
  • -30
  • Проголосовать: не нравится

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Please send link to your website. Thanks!

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

upvoted