// sam_send #include "message.h" #include <cassert> #include <iostream> using namespace std; // const int M = 1024 * 256; // OK, u'report_id': 2640769 const int M = 1024 * 257; // RV, u'report_id': 2640743 int main() { if (MyNodeId() == 0) { for (int i = 0; i < M; ++i) { PutChar(1, 1); } Send(1); cout << -1 << endl; } if (MyNodeId() == 1) { Receive(0); for (int i = 0; i < M; ++i) { GetChar(0); } } return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | // sam_send #include "message.h" #include <cassert> #include <iostream> using namespace std; // const int M = 1024 * 256; // OK, u'report_id': 2640769 const int M = 1024 * 257; // RV, u'report_id': 2640743 int main() { if (MyNodeId() == 0) { for (int i = 0; i < M; ++i) { PutChar(1, 1); } Send(1); cout << -1 << endl; } if (MyNodeId() == 1) { Receive(0); for (int i = 0; i < M; ++i) { GetChar(0); } } return 0; } |