/ OIer TK /

记录详情

Compile Error

/in/foo.cc:20:1: error: 'vector' does not name a type
   20 | vector<pthread_t> threads;
      | ^~~~~~
/in/foo.cc: In function 'void solve()':
/in/foo.cc:50:25: error: 'threads' was not declared in this scope; did you mean 'read'?
   50 |         pthread_create(&threads[i], nullptr, worker, nullptr);
      |                         ^~~~~~~
      |                         read
/in/foo.cc:52:22: error: 'threads' was not declared in this scope; did you mean 'read'?
   52 |         pthread_join(threads[i], nullptr);
      |                      ^~~~~~~
      |                      read
/in/foo.cc: In function 'int main()':
/in/foo.cc:62:5: error: 'threads' was not declared in this scope; did you mean 'read'?
   62 |     threads.resize(threads_num);  // vector运行期调整大小
      |     ^~~~~~~
      |     read
/in/foo.cc:60:10: warning: unused variable 'THREADS' [-Wunused-variable]
   60 |     long THREADS = sysconf(_SC_NPROCESSORS_ONLN);
      |          ^~~~~~~

信息

递交者
类型
递交
题目
P1387 生命游戏
语言
C++
递交时间
2026-02-20 14:57:09
评测时间
2026-02-20 14:57:09
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes