Submission #53322387


Source Code Expand

Copy
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <set>
#include <stack>
#include <map>
#include <list>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <fstream>
#include <ios>
#include <signal.h>
#include <queue>
#include <ctime>
#include <bitset>
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <set>
#include <stack>
#include <map>
#include <list>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <fstream>
#include <ios>
#include <signal.h>
#include <queue>
#include <ctime>
#include <bitset>
#include <unordered_map>
#include <random>
#include <unordered_set>
#include <functional>
//#include <windows.h>
//#include "Header.h"
//#define f first
//#define s second

typedef long long ll;
typedef unsigned long long ull;

using namespace std;

ll GCD(ll a, ll b) {
    if (b > a) {
        swap(a, b);
    }
    if (a < 0 || b < 0) {
        return a >= 0 ? a : b;
    }
    while (b != 0 && a != b) {
        ll t = b;
        b = a % b;
        a = t;
    }
    return a;
}

pair<ll, ll> GCDEX(ll a, ll b) {
    if (b > a) {
        swap(a, b);
    }
    ll x1 = 1, y1 = 0, x2 = 0, y2 = 1, tx, ty;
    while (b != 0 && a != b) {
        tx = x1 - (a / b) * x2, ty = y1 - (a / b) * y2;
        x1 = x2, y1 = y2, x2 = tx, y2 = ty;
        ll t = b;
        b = a % b;
        a = t;
    }
    return { x1, y1 };
}

ll bpow(ll n, ll a, const ll mod) { return n == 0 ? 1 : n & 1 ? a * (bpow(n - 1, a, mod) % mod) % mod : bpow(n >> 1, a * (a % mod) % mod, mod); }

const int SIZE = 1510;

int main(int argc, char* argv[]) {
    //SetConsoleCP(1251);
    //SetConsoleOutputCP(1251);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    //string alf = "abcdefghijklmnopqrstuvwxyz";
    //srand(time(0));
    //const double PI = 3.1415926535897932;
    //hash<string> hasher;
    const double eps = 0.000000001;
    const long long mod = 1e9 + 7;
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n;
    cin >> n;
    vector<ll> v(n);
    for (ll i = 0; i < n; ++i) {
        cin >> v[i];
    }
    for (ll i = 1; i < n; ++i) {
        if (v[i] > v[0]) {
            cout << i + 1 << '\n';
            return 0;
        }
    }
    cout << -1 << '\n';
    return 0;
}

/*
4
3 2 5 2

3
4 3 2

7
10 5 10 2 10 13 15
*/

/*//#pragma GCC optimize("Ofast,unroll-loops")
//#pragma GCC target("sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <set>
#include <stack>
#include <map>
#include <list>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <fstream>
#include <ios>
#include <signal.h>
#include <queue>
#include <ctime>
#include <windows.h>
//#include "Header.h"
//#define f first
//#define s second

using namespace std;

int main(int argc, char* argv[]) {
    //SetConsoleCP(1251);
    //SetConsoleOutputCP(1251);
    //freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    //string alf = "abcdefghijklmnopqrstuvwxyz";
    //string alf = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    long long cnt = 0;
    for (long long i = 1; cnt + i <= 1e9; ) {
        cnt += i;
        i *= 2;
    }
    //cout << cnt << '\n';
    long long t = 1;
    cout << t << '\n';
    srand(time(0));
    while (t--) {
        cout << 100000 << '\n';
        for (long long i = 0; i < 1e5; ++i) {
            cout << 1000000 << ' ';
        }
        cout << '\n' << 100000 << '\n';
        for (long long i = 0; i < 1e5; ++i) {
            cout << 1 << ' ' << 1 << ' ' << 100000;
        }
    }
    return 0;
}

ll t, n, m, q, a, b, c, d, x, mx, mn, k, cnt, l, r, ans, temp, id;
string s, s1, s2;
cin >> t;
while (t--) {

}*/

Submission Info

Submission Time
Task A - Buildings
User Darius17
Language C++ 20 (gcc 12.2)
Score 100
Code Size 3945 Byte
Status AC
Exec Time 1 ms
Memory 3512 KB

Compile Error

Main.cpp: In function ‘int main(int, char**)’:
Main.cpp:79:18: warning: unused variable ‘eps’ [-Wunused-variable]
   79 |     const double eps = 0.000000001;
      |                  ^~~
Main.cpp:80:21: warning: unused variable ‘mod’ [-Wunused-variable]
   80 |     const long long mod = 1e9 + 7;
      |                     ^~~
Main.cpp:70:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
   70 | int main(int argc, char* argv[]) {
      |          ~~~~^~~~
Main.cpp:70:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
   70 | int main(int argc, char* argv[]) {
      |                    ~~~~~~^~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1 ms 3376 KB
00_sample_02.txt AC 1 ms 3408 KB
00_sample_03.txt AC 1 ms 3412 KB
01_test_01.txt AC 1 ms 3416 KB
01_test_02.txt AC 1 ms 3452 KB
01_test_03.txt AC 1 ms 3512 KB
01_test_04.txt AC 1 ms 3412 KB
01_test_05.txt AC 1 ms 3380 KB
01_test_06.txt AC 1 ms 3416 KB
01_test_07.txt AC 1 ms 3404 KB
01_test_08.txt AC 1 ms 3444 KB
01_test_09.txt AC 1 ms 3424 KB
01_test_10.txt AC 1 ms 3380 KB
01_test_11.txt AC 1 ms 3432 KB
01_test_12.txt AC 1 ms 3432 KB


2025-03-09 (Sun)
18:37:00 +00:00