Доброчанька 05/13/2023 (Sat) 08:43 No.3594 del
>>3591
>Качество кода измеряется, например, по HumanEval pass@1.
Что, батенька, вы опять всех подебили по собственным критериям? По результатам измерения dirty pants index нейросеть программирует лучше на 146%!
>Write me a C++ code for making a boiled egg where it needs to be boiled for 7 minutes, but cooking has to be immediately stopped if a phone call from a hospital is received (implemented as an interrupt).
#include <iostream>
#include <chrono>
#include <thread>
#include <csignal>

using namespace std;

volatile bool cooking_stopped = false; // flag to indicate cooking has been stopped

void handle_interrupt(int signal) {
cout << "Cooking stopped due to phone call from hospital." << endl;
cooking_stopped = true; // set flag to indicate cooking has been stopped
}

Message too long. Click here to view full text.