QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#124789#5647. Another Wine Tasting EventHongzy#WA 0ms3592kbC++171.1kb2023-07-15 15:34:382023-07-15 15:34:40

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-15 15:34:40]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3592kb
  • [2023-07-15 15:34:38]
  • 提交

answer

#include <bits/stdc++.h>
#define LOG(FMT...) fprintf(stderr, FMT);
#define rep(i, j, k) for(int i = j; i <= k; ++ i)
#define per(i, j, k) for(int i = j; i >= k; -- i)
using namespace std;

#define fs first
#define sc second
#define pb push_back
#define mp make_pair

using db = double;
using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

mt19937 mt(chrono::system_clock::now().time_since_epoch().count());
uniform_int_distribution<ll> ran(0, 1ll << 62);
void ucin() { ios::sync_with_stdio(0); cin.tie(0); }
// uniform_real_distribution<double> dbran;
template<class T> inline void chkmax(T &x, const T &y) { if(x < y) x = y; }
template<class T> inline void chkmin(T &x, const T &y) { if(x > y) x = y; }
inline ll sqr(ll x) { return x * x; }
inline ll cub(ll x) { return x * x * x; }

const int N = 2e6 + 10;
const int mod = 1e9 + 7;
int n;
char s[N];
int main() {
  scanf("%d%s", &n, s + 1);
  int z = 0;
  rep(i, 1, 2*n-1) z += s[i] == 'R';
  if(z >= n) {
    puts("0");
  } else {
    puts("1");
  }
  return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3592kb

input:

5
RWWRRRWWW

output:

1

result:

wrong answer Not enough intervals