QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#807050#7853. Naming Wine BottlesSGColinAC ✓12ms5152kbC++20524b2024-12-09 18:32:032024-12-09 18:32:03

Judging History

This is the latest submission verdict.

  • [2024-12-09 18:32:03]
  • Judged
  • Verdict: AC
  • Time: 12ms
  • Memory: 5152kb
  • [2024-12-09 18:32:03]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define rep(i, a, b) for (int i = (a); i <= (b); ++i)

map<double, string> f;

int main() {
    cin.tie(0);
    int n; cin >> n;
    string cur = "a";
    rep(i, 1, n) {
        double d; char ch;
        cin >> d >> ch;
        if (f.find(d) == f.end()) {
            f[d] = cur;
            if (cur.back() == 'z') cur += 'a';
            else cur[cur.size() - 1] += 1;
        }
        cout << f[d] << endl;
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3972kb

input:

6
15L
0.88L
1.0L
1L
1000L
1024L

output:

a
b
c
c
d
e

result:

ok correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

3
0.03L
0.031L
0.03L

output:

a
b
a

result:

ok correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

10
4.770735L
4.770735L
5.92862L
5.92862L
3.425951L
5.92862L
3.425951L
3.425951L
5.92862L
4.770735L

output:

a
a
b
b
c
b
c
c
b
a

result:

ok correct

Test #4:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

10
7.36436L
6.289289L
2.133974L
4.457658L
4.457658L
7.710847L
7.710847L
7.710847L
0.478477L
0.478477L

output:

a
b
c
d
d
e
e
e
f
f

result:

ok correct

Test #5:

score: 0
Accepted
time: 1ms
memory: 3736kb

input:

100
5.05522L
8.862544L
6.172678L
6.172678L
8.862544L
0.841998L
2.638153L
6.172678L
9.411611L
9.411611L
2.638153L
0.697531L
0.841998L
2.638153L
9.411611L
0.697531L
3.927525L
8.862544L
6.172678L
0.697531L
2.638153L
3.576146L
5.795909L
2.638153L
9.411611L
5.795909L
0.697531L
8.862544L
0.841998L
0.69753...

output:

a
b
c
c
b
d
e
c
f
f
e
g
d
e
f
g
h
b
c
g
e
i
j
e
f
j
g
b
d
g
d
f
h
d
g
e
b
j
i
e
b
h
g
c
g
c
h
h
a
i
b
i
g
g
h
a
b
c
i
a
g
g
e
c
b
a
d
h
c
a
e
a
g
g
h
i
j
j
c
d
b
i
e
d
d
d
c
e
a
a
d
c
i
g
g
a
c
a
e
f

result:

ok correct

Test #6:

score: 0
Accepted
time: 2ms
memory: 3968kb

input:

1000
5.538973L
8.168853L
7.756989L
5.187158L
8.566494L
5.161256L
4.365565L
9.83514L
0.451117L
5.434878L
6.587507L
6.353477L
3.955333L
7.158839L
7.034269L
9.979945L
8.273649L
6.964936L
7.512418L
2.749434L
1.005619L
9.550021L
8.982797L
7.800609L
6.353477L
8.273649L
3.325318L
2.544549L
5.538973L
3.4033...

output:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
l
q
y
z
a
za
zb
s
zc
zd
ze
zf
zg
zh
zf
zi
zj
zk
e
zl
zm
zn
zo
zp
zq
zm
zr
zb
zs
i
g
t
zt
zu
zv
zr
zh
ze
zw
zo
zx
zy
zk
h
zg
zz
zza
ze
zzb
zh
zzc
a
zzd
zzd
zx
zzd
d
zq
zo
zy
zs
zzd
zze
zzf
zm
zzg
zzh
zzi
zzh
zzj
s
zzg
q
zq
zzk
zzl
u
zzk
zzm
zzn
e
i
i
zz...

result:

ok correct

Test #7:

score: 0
Accepted
time: 12ms
memory: 3968kb

input:

10000
2.587081L
7.950315L
0.50137L
8.130996L
8.258044L
6.360881L
7.972785L
8.785474L
7.329022L
5.585725L
1.273491L
8.446212L
2.148699L
0.464245L
0.668281L
5.106325L
1.803361L
8.130996L
5.936396L
5.585725L
1.762492L
8.126972L
7.329022L
4.021037L
7.950315L
7.51875L
8.785474L
5.106325L
0.668281L
0.4642...

output:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
d
r
j
s
t
i
u
b
v
h
p
o
n
w
x
y
z
za
zb
zc
zd
ze
zf
p
zg
zh
zi
zj
zk
zl
zm
zn
zo
h
zp
zq
j
h
zr
s
zs
zt
zu
zj
zv
zw
zx
zy
zz
zza
zw
zza
zy
zzb
zzc
zu
zzd
zze
zzf
zzg
p
s
zu
zg
zzh
zzi
o
zg
y
k
zk
zza
w
zzj
zzk
zq
zu
zzl
zzm
zg
za
zzc
zx
f
zzn
zn
zzo
ze
zzp
x
r
q
zp
...

result:

ok correct

Test #8:

score: 0
Accepted
time: 4ms
memory: 5152kb

input:

10000
1.93645L
8.537884L
1.285027L
6.410685L
3.528163L
0.926381L
7.718155L
0.811629L
8.951888L
7.56814L
9.379188L
2.199272L
5.680321L
7.277497L
3.698285L
3.728882L
2.998746L
2.750217L
5.037808L
7.405915L
1.290851L
3.946109L
1.770729L
9.99265L
8.156179L
9.414128L
8.481497L
3.308084L
0.382196L
6.10429...

output:

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
za
zb
zc
zd
ze
zf
zg
zh
zi
zj
zk
zl
zm
zn
zo
zp
zq
zr
zs
zt
zu
zv
zw
zx
zy
zz
zza
zzb
zzc
zzd
zze
zzf
zzg
zzh
zzi
zzj
zzk
zzl
zzm
zzn
zzo
zzp
zzq
zzr
zzs
zzt
zzu
zzv
zzw
zzx
zzy
zzz
zzza
zzzb
zzzc
zzzd
zzze
zzzf
zzzg
zzzh
zzzi
zzzj
zzzk
zzzl
zzzm
z...

result:

ok correct

Test #9:

score: 0
Accepted
time: 0ms
memory: 3756kb

input:

11
9999.0000000000L
9999.0000000001L
9999.0000000002L
9999.0000000003L
9999.0000000004L
9999.0000000005L
9999.0000000006L
9999.0000000007L
9999.0000000008L
9999.0000000009L
9999.0000000010L

output:

a
b
c
d
e
f
g
h
i
j
k

result:

ok correct