Submission #56254969
Source Code Expand
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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) {
bool flag = true;
if (b > a) {
swap(a, b);
flag = false;
}
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;
}
if (!flag) {
ll temp = x1;
x1 = y1;
y1 = temp;
}
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 = 65;
vector<vector<ll> > matrix_product(vector<vector<ll> >& mat1, vector<vector<ll> >& mat2, const ll &mod) {
vector<vector<ll> > temp(mat1.size(), vector<ll>(mat1.size()));
for (ll i = 0; i < mat1.size(); ++i) {
for (ll j = 0; j < mat1.size(); ++j) {
ll tmp = 0;
for (ll g = 0; g < mat1.size(); ++g) {
tmp += (mat1[i][g] * mat2[g][j]) % mod;
tmp %= mod;
}
temp[i][j] = tmp;
}
}
return temp;
}
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 ll mod = 1e9 + 7;
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
vector<pair<ll, ll> > v(n);
for (ll i = 1; i <= n; ++i) {
cin >> v[i - 1].first;
v[i - 1].second = i;
}
sort(v.begin(), v.end());
cout << v[n - 2].second << '\n';
return 0;
}
/*
*/
/*//#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);
ll cnt = 0;
for (ll i = 1; cnt + i <= 1e9; ) {
cnt += i;
i *= 2;
}
//cout << cnt << '\n';
ll t = 1;
cout << t << '\n';
srand(time(0));
while (t--) {
cout << 100000 << '\n';
for (ll i = 0; i < 1e5; ++i) {
cout << 1000000 << ' ';
}
cout << '\n' << 100000 << '\n';
for (ll 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;
bool flag = true;
cin >> t;
while (t--) {
}*/
Submission Info
Submission Time |
|
Task |
B - Second Best |
User |
Darius17 |
Language |
C++ 20 (gcc 12.2) |
Score |
200 |
Code Size |
4480 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
3560 KB |
Compile Error
Main.cpp: In function ‘std::vector<std::vector<long long int> > matrix_product(std::vector<std::vector<long long int> >&, std::vector<std::vector<long long int> >&, const ll&)’:
Main.cpp:79:22: warning: comparison of integer expressions of different signedness: ‘ll’ {aka ‘long long int’} and ‘std::vector<std::vector<long long int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
79 | for (ll i = 0; i < mat1.size(); ++i) {
| ~~^~~~~~~~~~~~~
Main.cpp:80:26: warning: comparison of integer expressions of different signedness: ‘ll’ {aka ‘long long int’} and ‘std::vector<std::vector<long long int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
80 | for (ll j = 0; j < mat1.size(); ++j) {
| ~~^~~~~~~~~~~~~
Main.cpp:82:30: warning: comparison of integer expressions of different signedness: ‘ll’ {aka ‘long long int’} and ‘std::vector<std::vector<long long int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
82 | for (ll g = 0; g < mat1.size(); ++g) {
| ~~^~~~~~~~~~~~~
Main.cpp: In function ‘int main(int, char**)’:
Main.cpp:101:18: warning: unused variable ‘eps’ [-Wunused-variable]
101 | const double eps = 0.000000001;
| ^~~
Main.cpp:102:14: warning: unused variable ‘mod’ [-Wunused-variable]
102 | const ll mod = 1e9 + 7;
| ^~~
Main.cpp:92:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
92 | int main(int argc, char* argv[]) {
| ~~~~^~~~
Main.cpp:92:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
92 | int main(int argc, char* argv[]) {
| ~~~~~~^~~~~~
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
200 / 200 |
Status |
|
|
Set Name |
Test Cases |
Sample |
00_sample_01.txt, 00_sample_02.txt |
All |
00_sample_01.txt, 00_sample_02.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, 01_test_13.txt |
Case Name |
Status |
Exec Time |
Memory |
00_sample_01.txt |
AC |
1 ms |
3504 KB |
00_sample_02.txt |
AC |
1 ms |
3492 KB |
01_test_01.txt |
AC |
1 ms |
3424 KB |
01_test_02.txt |
AC |
1 ms |
3508 KB |
01_test_03.txt |
AC |
1 ms |
3500 KB |
01_test_04.txt |
AC |
1 ms |
3508 KB |
01_test_05.txt |
AC |
1 ms |
3360 KB |
01_test_06.txt |
AC |
1 ms |
3424 KB |
01_test_07.txt |
AC |
1 ms |
3444 KB |
01_test_08.txt |
AC |
1 ms |
3500 KB |
01_test_09.txt |
AC |
1 ms |
3560 KB |
01_test_10.txt |
AC |
1 ms |
3436 KB |
01_test_11.txt |
AC |
1 ms |
3420 KB |
01_test_12.txt |
AC |
1 ms |
3496 KB |
01_test_13.txt |
AC |
1 ms |
3508 KB |