QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#116250#6661. 야유회yyyyxh#Compile Error//C++17290b2023-06-28 12:39:522024-05-31 18:24:17

Judging History

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

  • [2024-05-31 18:24:17]
  • 评测
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-28 12:39:52]
  • 提交

answer

#include "workshop.h"
#include <random>
void init(){}
int morning(int my_num,int right_num){
	return my_num;
}
int afternoon(int left_num,int my_num,int right_num){
	return my_num;
}
int evening(int left_num,int my_num,int right_num){
	mt19937 rng(my_num);
	return rng()%35;
}

详细

answer.code: In function ‘int evening(int, int, int)’:
answer.code:11:9: error: ‘mt19937’ was not declared in this scope; did you mean ‘std::mt19937’?
   11 |         mt19937 rng(my_num);
      |         ^~~~~~~
      |         std::mt19937
In file included from /usr/include/c++/11/random:49,
                 from answer.code:2:
/usr/include/c++/11/bits/random.h:1578:37: note: ‘std::mt19937’ declared here
 1578 |     0xefc60000UL, 18, 1812433253UL> mt19937;
      |                                     ^~~~~~~
answer.code:12:16: error: ‘rng’ was not declared in this scope
   12 |         return rng()%35;
      |                ^~~