Submission #1679507


Source Code Expand

#include<bits/stdc++.h>
using namespace std;

int main(){
	int t, n, m;
	vector<int> a, b;

	int temp;

	cin >> t;
	cin >> n;

	for (int i = 0; i < n; i++){
		cin >> temp;
		a.push_back(temp);
	}

	cin >> m;

	for (int i = 0; i < m; i++){
		cin >> temp;
		b.push_back(temp);
	}

	if(m>n){
		cout << "no" << endl;
	}else{
		bool s = false;
		int j = 0;

		for (int i = 0; i < m; i++){
			s = false;
			while (j < n)
			{
				if(a[j]-b[i]<=t){
					s = true;
					j++;
					break;
				}else{
					j++;
				}
			}
			i(!s){
				break;
			}
		}

			if (s)
			{
				cout << "yes" << endl;
			}
			else
			{
				cout << "no" << endl;
			}
	}

}

Submission Info

Submission Time
Task C - おいしいたこ焼きの売り方
User himajin008
Language C++14 (GCC 5.4.1)
Score 0
Code Size 695 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:43:8: error: ‘i’ cannot be used as a function
    i(!s){
        ^