Submission #59522500


Source Code Expand

#include<bits/stdc++.h>
#include"atcoder/all"
using namespace std;
using namespace atcoder;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) a.begin(),a.end()
typedef long long ll;
typedef vector<ll> vi;
constexpr ll mod = 1000000007;
typedef modint1000000007 mi;

ll a[46],b[46],c[46];

int main(){
    int n;cin>>n;
    rep(i,n){
        int ca;cin>>ca;a[ca%46]++;
    }
    rep(i,n){
        int ca;cin>>ca;b[ca%46]++;
    }
    rep(i,n){
        int ca;cin>>ca;c[ca%46]++;
    }
    ll ans=0;

    rep(i,46){
        rep(j,46){
            ans+=a[i]*b[j]*c[(92-i-j)%46];
        }
    }
    cout<<ans<<endl;
}

Submission Info

Submission Time
Task 046 - I Love 46(★3)
User Rho17
Language C++ 20 (gcc 12.2)
Score 3
Code Size 651 Byte
Status AC
Exec Time 80 ms
Memory 3716 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 3 / 3
Status
AC × 3
AC × 20
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 80 ms 3504 KiB
hand_02.txt AC 26 ms 3536 KiB
hand_03.txt AC 57 ms 3580 KiB
hand_04.txt AC 1 ms 3568 KiB
random_01.txt AC 41 ms 3576 KiB
random_02.txt AC 45 ms 3452 KiB
random_03.txt AC 65 ms 3484 KiB
random_04.txt AC 58 ms 3580 KiB
random_05.txt AC 67 ms 3524 KiB
random_06.txt AC 5 ms 3716 KiB
random_07.txt AC 62 ms 3520 KiB
random_08.txt AC 67 ms 3580 KiB
random_09.txt AC 64 ms 3488 KiB
random_10.txt AC 62 ms 3504 KiB
random_11.txt AC 74 ms 3480 KiB
random_12.txt AC 75 ms 3536 KiB
random_13.txt AC 73 ms 3676 KiB
sample_01.txt AC 1 ms 3532 KiB
sample_02.txt AC 1 ms 3580 KiB
sample_03.txt AC 1 ms 3684 KiB