Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
#include <cassert>
#include<string>
#include<vector>
#include <utility>
#include <math.h>
using namespace std;
int c[555], s[555], f[555],time[555];
int tcop;
int main() {
	int N = 0;
	cin >> N;
	for (int i = 0; i < N-1; i++) {
		cin >> c[i] >> s[i] >> f[i];
		time[i] += (c[i] + s[i]);
	}
	for (int i = 0; i < N-1; i++) {
		for(int k=i+1;k<N-1;k++){
			if ((time[i] - s[k]) % f[k] == 0&&time[i]>=s[k]) {
				time[i] += c[k];
			}
			else {
				tcop = s[k];
				while (time[i] >= tcop) {
					tcop += f[k];
				}
				time[i]= tcop;
			}
		}
	}
	for (int i = 0; i < N - 1; i++) {
		cout << time[i] << endl;
	}
	cout << '0' << endl;
	return 0;
}

Compiler output:
a.cc:10:36: error: 'int time [555]' redeclared as different kind of entity
   10 | int c[555], s[555], f[555],time[555];
      |                                    ^
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:17:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   17 |                 time[i] += (c[i] + s[i]);
      |                       ^
a.cc:17:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   17 |                 time[i] += (c[i] + s[i]);
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~
a.cc:17:25: error: assignment of read-only location '*(time + ((sizetype)i))'
a.cc:21:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   21 |                         if ((time[i] - s[k]) % f[k] == 0&&time[i]>=s[k]) {
      |                                    ^
a.cc:21:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   21 |                         if ((time[i] - s[k]) % f[k] == 0&&time[i]>=s[k]) {
      |                              ~~~~~~~~^~~~~~
a.cc:21:46: error: invalid operands of types 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} and 'int' to binary 'operator%'
   21 |                         if ((time[i] - s[k]) % f[k] == 0&&time[i]>=s[k]) {
      |                             ~~~~~~~~~~~~~~~~ ^ ~~~~
      |                                      |            |
      |                                      |            int
      |                                      time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:21:65: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   21 |                         if ((time[i] - s[k]) % f[k] == 0&&time[i]>=s[k]) {
      |                                                                 ^
a.cc:21:66: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |                         if ((time[i] - s[k]) % f[k] == 0&&time[i]>=s[k]) {
      |                                                           ~~~~~~~^~~~~~
a.cc:22:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |                                 time[i] += c[k];
      |                                       ^
a.cc:22:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |                                 time[i] += c[k];
      |                                 ~~~~~~~~^~~~~~~
a.cc:22:41: error: assignment of read-only location '*(time + ((sizetype)i))'
a.cc:26:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   26 |                                 while (time[i] >= tcop) {
      |                                              ^
a.cc:26:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                                 while (time[i] >= tcop) {
      |                                        ~~~~~~~~^~~~~~~
a.cc:29:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   29 |                                 time[i]= tcop;
      |                                       ^
a.cc:29:40: error: assignment of read-only location '*(time + ((sizetype)i))'
   29 |                                 time[i]= tcop;
      |                                 ~~~~~~~^~~~~~
a.cc:34:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   34 |                 cout << time[i] << endl;
      |                               ^