pow(10, 3)-pow(2, 2)-pow(1, 1)
查看原帖
pow(10, 3)-pow(2, 2)-pow(1, 1)
1165586
lizishi楼主2025/1/20 21:40

Advertisement 1

        西江月·WA
明月别枝WA,清风半夜RE。
样例对里得0分,听取RE一片。
 
七八个RE外,两三点WA前。
旧时WA社林边,路转AC想见。

译文:
天边的明月升上了树梢,惊飞了栖息在枝头的WA。清凉的晚风仿佛传来了远处的RE声。在样例正确的program里,人们谈论着0分的WA,眼前传来一个个RE的字幕,好像在说着0分。
七八个RE出现在眼前,夹杂着两三个若隐若现的WA,从前那熟悉的WA依然坐落在土地庙附近的树林中,路一转,好想见到尽可能多的AC浮现在眼前。

995
RE: 8 WA: 2 TLE: 0 MLE: 0 AC: 0

出现re就够了数量还不定:( P

#include <bits/stdc++.h>

#define Need using
#define your namespace
#define help std
#define May return
#define I 1
#define have >
#define Your 1
#define Help +1
#define Say 1
#define yes :
#define please 0
#define Wrong int
#define answer main

Need your help;

deque < int > arrs;

Wrong answer() {
    int n, l, r;
    double sum = 0;
    double max = -100000;
    int siz = 0;
    cin >> n >> l >> r;
    double a[n];
    int i = 0;
    for (; i < n; i++) cin >> a[i];
	i = 0;
    while (i < n) {
        for (int j = 0; j < l; i++, j++) {
            arrs.push_back(i);
            sum += a[i];
            siz++;
        }
		if (max < sum / siz) {
			max = sum / siz;
		}
        for (; i < n; i++) {
            if (siz < r && (a[i] + sum) / siz > max) {
                arrs.push_back(i);
                siz++;
                sum += a[i];
                if (max < sum / siz) max = sum / siz;
            } else if (siz == r && a[i] > a[arrs.front()]) {
                sum -= a[arrs.front()];
                arrs.pop_front();
                arrs.push_back(i);
                sum += a[i];
                if (max < sum / siz) max = sum / siz;
            } else {
				arrs.clear();
				break;
			}
        }
		//cout << sum;
		sum = 0;
    }
	printf("%.3f", max);
	May I have Your Help ? Say yes please;
}
2025/1/20 21:40
加载中...