Submission #867728

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8677282023-10-29 10:25:07CookiePIN (CEOI10_pin)C++14
30 / 100
206 ms16160 KiB
#include<bits/stdc++.h>
#include<fstream>
using namespace std;
ifstream fin("XMAS.INP");
ofstream fout("XMAS.OUT");
#define sz(a) (int)a.size()
#define ll long long
#define pb push_back
#define forr(i, a, b) for(int i = a; i < b; i++)
#define dorr(i, a, b) for(int i = a; i >= b; i--)
#define ld long double
#define vt vector
#include<fstream>
#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
const ld PI = 3.14159265359;
//using u128 = __uint128_t;
//const int x[4] = {1, -1, 0, 0};
//const int y[4] = {0, 0, 1, -1};
const ll mod = 1e9 + 9;
const int mxn = 50000 + 5, mxq = 2e5 + 5, sq = 500, mxv = 2e6 + 5;
const ll inf = 1e17 + 5;
//const int base= (1 << 18);
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, d;
int to[mxn + 1], pw[4];
string s[mxn + 1];
int conv(string s){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

pin.cpp: In function 'int conv(std::string)':
pin.cpp:33:23: warning: array subscript has type 'char' [-Wchar-subscripts]
   33 |         ans += to[s[i]] * pw[i];
      |                       ^
pin.cpp: In function 'int main()':
pin.cpp:72:40: warning: array subscript has type 'char' [-Wchar-subscripts]
   72 |     for(char c = '0'; c <= '9'; c++)to[c] = (c - '0');
      |                                        ^
pin.cpp:73:40: warning: array subscript has type 'char' [-Wchar-subscripts]
   73 |     for(char c = 'a'; c <= 'z'; c++)to[c] = (c - 'a') + 10;
      |                                        ^
#Verdict Execution timeMemoryGrader output
Fetching results...