AtCoder Beginner Contest 064

Submission #1778980

Source codeソースコード

#include <iostream>
#include <string>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cctype>
#include <map>
#include <vector>
#include <unordered_map>

#define div 1000000000+7

using ll = long long;
using namespace std;

void solve() {
    int n, count = 0, count2 = 0;
    bool flag[8];
    vector<int> a;

    for(int i = 0; i < 8; i++){
        flag[i] = true;
    }

    cin >> n;
    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        a.push_back(x);
        if(x < 400 && flag[0]){
            count++;
            flag[0] = false;
        }else if(x >= 400 && x < 800 && flag[1]){
            count++;
            flag[1] = false;
        }else if(x >= 800 && x < 1200 && flag[2]){
            count++;
            flag[2] = false;
        }else if(x >= 1200 && x < 1600 && flag[3]){
            count++;
            flag[3] = false;
        }else if(x >= 1600 && x < 2000 && flag[4]){
            count++;
            flag[4] = false;
        }else if(x >= 2000 && x < 2400 && flag[5]){
            count++;
            flag[5] = false;
        }else if(x >= 2400 && x < 2800 && flag[6]){
            count++;
            flag[6] = false;
        }else if(x >= 2800 && x < 3200 && flag[7]){
            count++;
            flag[7] = false;
        }else if(x >= 3200){
            count2++;
        }
    }

    cout << count << " " << count+count2 << endl;
}

int main() {
    solve();
    return 0;
}

Submission

Task問題 C - Colorful Leaderboard
User nameユーザ名 hecatier
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 WA
Score得点 0
Source lengthソースコード長 1535 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Sample - s1.txt,s2.txt,s3.txt
All 0 / 300 in1.txt,in2.txt,in3.txt,in4.txt,in5.txt,s1.txt,s2.txt,s3.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
in1.txt WA
in2.txt AC 1 ms 256 KB
in3.txt AC 1 ms 256 KB
in4.txt AC 1 ms 256 KB
in5.txt AC 1 ms 256 KB
s1.txt AC 1 ms 256 KB
s2.txt AC 1 ms 256 KB
s3.txt AC 1 ms 256 KB