AsadulloAbduev's blog

By AsadulloAbduev, history, 11 months ago, In English

In this problem limit for N is 1e5, but in 4th test says "time limit exceeded". Why? really 1 second isn't 1e8? This is my code:

#include <bits\stdc++.h>
#define vector vector
#define pb push_back
#define ll long long
#define ull unsigned long long
#define ld double
#define str string
#define yes cout << "YES"
#define no cout << "NO"

using namespace std;

ll mod = 1e9 + 7, MAX = 1e18, MIN = -1e18;
ld pi = 3.141592;

void solve()
{
    ll n, i;
    cin >> n;
    str s, x = "", ans = " ", y = "";
    cin >> s;
    s = '.' + s;
    for (i = 1; i <= n; i++){
        x += s[i];
        y = s[i] + y;
        ans = min(ans, x + y);
    }
    cout << ans;
} 

main()
{
///    setlocale(LC_ALL, "UTF-8");
///    freopen ("input.txt", "r", stdin);
///    freopen ("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t = 1;
    cin >> t;
    while (t --> 0){
        solve();
        cout << '\n';
    }
}

Full text and comments »

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

By AsadulloAbduev, history, 11 months ago, In English

I earlier created mashups but now i can't, why? How can i fixed it?

Full text and comments »

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

By AsadulloAbduev, history, 14 months ago, In English

Hello codeforces!, can you add new feature in codeforces? A feature that can compare you with someone else in plan of solving problems, raiting and contests. Who wants it feature?

Full text and comments »

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