Submission #117329


Source Code Expand

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstdio>
using namespace std;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define all(c) (c).begin(), (c).end()
#define iter(c) __typeof((c).begin())
#define pb push_back
#define mp make_pair
typedef long long ll;
const int inf = (1<<28);

int main() {
  ll n, t; cin >> n >> t;
  ll p = 0, q = 0; // prob -> p / q
  rep(i, n) {
    string name, rare; ll rate; cin >> name >> rare >> rate;
    if(name.find("Alicia") != string::npos && rare != "N") p += rate;
    q += rate;
  }
  
  ll usagi = t / 10;
  printf("%.8lf\n", (t-usagi)*((double)p/q));
}

Submission Info

Submission Time
Task E - Alicia's Rare card Challenge
User suminos
Language C++ (G++ 4.6.4)
Score 100
Code Size 666 Byte
Status AC
Exec Time 44 ms
Memory 928 KiB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 21
Set Name Test Cases
All 00-sample, 50-random-00, 50-random-01, 50-random-02, 50-random-03, 50-random-04, 50-random-05, 50-random-06, 50-random-07, 50-random-08, 50-random-09, 50-random-10, 50-random-11, 50-random-12, 50-random-13, 50-random-14, 50-random-15, 50-random-16, 50-random-17, 50-random-18, 50-random-19
Case Name Status Exec Time Memory
00-sample AC 23 ms 916 KiB
50-random-00 AC 41 ms 920 KiB
50-random-01 AC 33 ms 800 KiB
50-random-02 AC 39 ms 800 KiB
50-random-03 AC 37 ms 812 KiB
50-random-04 AC 31 ms 788 KiB
50-random-05 AC 35 ms 804 KiB
50-random-06 AC 27 ms 800 KiB
50-random-07 AC 35 ms 796 KiB
50-random-08 AC 27 ms 800 KiB
50-random-09 AC 27 ms 804 KiB
50-random-10 AC 32 ms 804 KiB
50-random-11 AC 40 ms 804 KiB
50-random-12 AC 23 ms 792 KiB
50-random-13 AC 31 ms 796 KiB
50-random-14 AC 44 ms 800 KiB
50-random-15 AC 43 ms 924 KiB
50-random-16 AC 23 ms 928 KiB
50-random-17 AC 27 ms 808 KiB
50-random-18 AC 27 ms 800 KiB
50-random-19 AC 37 ms 808 KiB