QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#249177#7562. Except OneUSP_USP_USP#WA 1ms3344kbC++20703b2023-11-12 01:47:132023-11-12 01:47:13

Judging History

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

  • [2023-11-12 01:47:13]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3344kb
  • [2023-11-12 01:47:13]
  • 提交

answer

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

#define all(x) x.begin(), x.end()
#define int int64_t
#define pb push_back

void dbg_out() { cerr << endl; }
template <typename H, typename... T>
void dbg_out(H h, T... t) { cerr << ' ' << h; dbg_out(t...); }
#define dbg(...) { cerr << #__VA_ARGS__ << ':'; dbg_out(__VA_ARGS__); }

void solve() {
	int p,k,t;
	cin >> p >> k >> t;
	if(t == p-1){
		cout << p-1 << '\n';
		return;
	}
	cout << (p-1)/2 << '\n';
}

signed main(){
	ios::sync_with_stdio(false); cin.tie(0);
	solve();
}

/*
Makefile:
CXXFLAGS=-Wall -Wextra -Wshadow -g -pedantic -fsanitize=address,undefined -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUGPEDANTIC -std=gnu++17
*/

详细

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3344kb

input:

7 5 3

output:

3

result:

wrong answer 1st numbers differ - expected: '1', found: '3'