oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

question Communication , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

readme.txt

The problem has been reimplemented

You should write the file question.cpp, which must include question.h, and implement the following 3 functions:

void Init(int N);
This function will be called once at the start of the program.

int Alice(int x,int y);
This function is for the character A, and should return the value h.

int Bob(int q,int h);
This function is for the character B, and should return 1 if the answer is "yes", and 0 if the answer is "no"


You program will be run twice, one for Alice and one for Bob. Init will be called at the start for both runs.

To test your program, you can use run the following commands to compile your programs:
g++ -O2 -o grader grader.cpp question.cpp

question.pdf

Your browser does not support embedded PDF files. Please download the PDF instead.

Tags

CEOI 2014

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
110027s256MBMinimum
2017s256MBMinimum

Attachments

Attachment Filesize Last Updated
question.cpp267B27 Jul 2018, 15:23:43
sample.txt40B27 Jul 2018, 15:23:43
question.h67B27 Jul 2018, 15:23:43
grader.cpp646B27 Jul 2018, 15:23:43

Judge Compile Command

g++-8 before.cpp question.cpp -o question_before -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512
g++-8 after.cpp question.cpp -o question_after -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.