제출 #629557

#제출 시각아이디문제언어결과실행 시간메모리
629557ElnadyVudu (COCI15_vudu)C++17
0 / 140
504 ms50808 KiB
#include <bits/stdc++.h>
#include <unordered_map>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
#define     endl                '\n'
//#define     long long                 long long
#define     all(pr1)            pr1.begin(),pr1.end()
#define     alr(pr1)            pr1.rbegin(),pr1.rend()
#define     CEIL(pr1, pr2)      (pr1 + pr2 - 1) / pr2
#define     IOS                 std::ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define		RT(s)				return cout<<s,0
#define		sz(s)				(long long)(s.size())

const long long N = 1e6 + 9, M = 1e9 + 9, MOD = 1e9 + 7, OO = 0x3f3f3f3f, MAX = 2147483647, LOO = 0x3f3f3f3f3f3f3f3f;

int32_t main()
{
	IOS;
	int n;
	long long m;
	cin >> n;
	vector<long long> a(N);
	vector<pair<long long, long long>> b;
	unordered_map<long long, int> mp;
	for (int i = 0; i < n; i++)
		cin >> a[i];
	cin >> m;
	for (int i = 0; i < n; i++)
		a[i] -= m;
	for (int i = 1; i < n; i++)
		a[i] += a[i - 1];
	for (int i = 0; i < n; i++)
		mp[a[i]]++;

	unordered_map<long long, int>::iterator it;
	for (it = mp.begin(); it != mp.end(); it++)
	{
		int xx = 5;
	}
	/*for (auto ch : mp)
		b.push_back({ ch.first, ch.second });*/

	cout << 0 << "\n";
}

컴파일 시 표준 에러 (stderr) 메시지

vudu.cpp: In function 'int32_t main()':
vudu.cpp:41:7: warning: unused variable 'xx' [-Wunused-variable]
   41 |   int xx = 5;
      |       ^~
#Verdict Execution timeMemoryGrader output
Fetching results...