Submission #154735

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1547352019-09-24 10:54:39arnold518PIN (CEOI10_pin)C++14
60 / 100
149 ms3148 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 5e4;
int N, D;
int A[MAXN+10][5], T[5]={1, 40, 40*40, 40*40*40};
ll ans[5];
int f(char x)
{
if('0'<=x && x<='9') return x-'0';
else return x-'a'+10;
}
int solve()
{
int i, j, k, p, q;
for(i=0; i<4; i++)
{
map<int, int> M;
for(j=1; j<=N; j++)
{
ans[1]+=M[A[j][4]-A[j][i]];
M[A[j][4]-A[j][i]]++;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

pin.cpp: In function 'int solve()':
pin.cpp:22:18: warning: unused variable 'p' [-Wunused-variable]
     int i, j, k, p, q;
                  ^
pin.cpp:22:21: warning: unused variable 'q' [-Wunused-variable]
     int i, j, k, p, q;
                     ^
pin.cpp:46:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
pin.cpp: In function 'int main()':
pin.cpp:50:12: warning: unused variable 'j' [-Wunused-variable]
     int i, j;
            ^
pin.cpp:52:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d", &N, &D);
     ~~~~~^~~~~~~~~~~~~~~~
pin.cpp:56:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", s);
         ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...