結果
| 問題 |
No.8043 yukicoderへようこそ!
|
| コンテスト | |
| ユーザー |
eto_nagisa
|
| 提出日時 | 2019-04-01 21:20:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 3,544 bytes |
| コンパイル時間 | 1,879 ms |
| コンパイル使用メモリ | 181,936 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-26 10:47:51 |
| 合計ジャッジ時間 | 3,254 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 6 |
ソースコード
#include "bits/stdc++.h"
#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9
constexpr int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
constexpr int dy[8] = { 0,1,1,1,0,-1,-1,-1 };
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
template <class T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
void a() {
int a, b; cin >> a >> b;
cout << (b + a - 1) / a << endl;
}
void b() {
int a, b;
cin >> a >> b;
cout << a / b + 1 << endl;
}
void c() {
cout << 30 << endl;
}
void d() {
int n, k;
cin >> n >> k;
if (n == k)cout << "Drew" << endl;
else if (n == (k + 2) % 3)cout << "Won" << endl;
else cout << "Lost" << endl;
}
void e() {
ll a, b;
cin >> a >> b;
FOR(i, a, b + 1) {
bool f = false;
ll v = i;
while (v > 0) {
if (v % 10 == 3)f = true;
v /= 10;
}
if (f || i % 3 == 0)cout << i << endl;
}
}
void f() {
vi v(3);
REP(i, 3)cin >> v[i];
v[1] += v[2] / 25;
v[2] %= 25;
v[0] += v[1] / 4;
v[1] %= 4;
v[0] %= 10;
cout << v[0] + v[1] + v[2] << endl;
}
void g() {
string s;
cin >> s;
REP(i, s.size()) {
if (islower(s[i]))s[i] = toupper(s[i]);
else s[i] = tolower(s[i]);
}
cout << s << endl;
}
void h() {
string s;
cin >> s;
int cnt = 0;
REP(i, s.size()) {
if (isdigit(s[i]))cnt += s[i] - '0';
}
cout << cnt << endl;
}
void i() {
int n;
cin >> n;
vector<double> v(n);
REP(i, n)cin >> v[i];
sort(ALL(v));
cout << fixed << setprecision(12) << (v[n / 2] + v[(n - 1) / 2]) / 2 << endl;
}
void j() {
int k, n, f;
cin >> k >> n >> f;
int a = k * n;
REP(i, f) {
int b;
cin >> b;
a -= b;
}
if (a < 0)cout << -1 << endl;
else cout << a << endl;
}
void k() {
int d, p;
cin >> d >> p;
cout << d + d * p / 100 << endl;
}
void l() {
int l, n;
cin >> l >> n;
vi v(n);
REP(i, n)cin >> v[i];
sort(ALL(v));
int cnt = 0;
REP(i, n) {
if (v[i] <= l) {
cnt++;
l -= v[i];
}
}
cout << cnt << endl;
}
void m() {
int l, k;
cin >> l >> k;
cout << k * ((l + 2 * k - 1) / (2 * k) - 1) << endl;
}
void n() {
int n = 55;
REP(i, 9) {
int a;
cin >> a;
n -= a;
}
cout << n << endl;
}
void o() {
string s;
cin >> s;
int cnt = 0;
REP(i, s.size()) {
if (isdigit(s[i]))cnt += s[i] - '0';
}
cout << cnt << endl;
}
void p() {
int n;
cin >> n;
int i = 1;
int cnt = 0;
while (n > i) {
cnt++;
i <<= 1;
}
cout << cnt << endl;
}
void q() {
int x, y, l;
cin >> x >> y >> l;
int ans = (abs(x) + l - 1) / l + (abs(y) + l - 1) / l;
if (x != 0) {
if (y > 0)ans++;
else if (y < 0)ans += 2;
else ans++;
}
else if (x == 0) {
if (y < 0)ans += 2;
}
cout << ans << endl;
}
void r() {
int n, h, m, t;
cin >> n >> h >> m >> t;
m += t * (n - 1);
h += m / 60;
m %= 60;
h %= 24;
cout << h << endl << m << endl;
}
void s() {
string a, b;
cin >> a >> b;
sort(ALL(a)); sort(ALL(b));
if (a == b)cout << "YES" << endl;
else cout << "NO" << endl;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
a();
b();
c();
d();
e();
f();
g();
h();
i();
j();
k();
l();
m();
n();
o();
p();
q();
r();
s();
}
eto_nagisa