답안 #86325

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
86325 2018-11-26T07:23:08 Z I_use_Brute_force Telefoni (COCI17_telefoni) C++14
16 / 80
26 ms 1660 KB
 #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair <int, int>
#define sz(a) (int)(a.size()) 
#define resize(v) v.resize(unique(all(v)) - v.begin()); 
#define all(a) a.begin(), a.end()
#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it ++)

using namespace std;

void Fast_Read_Out()
{
	ios_base::sync_with_stdio(0);
	cin.tie(), cout.tie();
}

void Random()
{
	unsigned int seed;
	asm("rdtsc" : "=A" (seed));
	srand(seed);        
}

unsigned int Time()
{
	 unsigned int time = clock() / 1000.00;
	 return time;
}

const int inf = int(1e9) + 123;
const int N = int(5e5) + 123;

int a[N], cnt, ans;

int main ()
{
	#ifdef JUDGE
		freopen("input.txt", "r", stdin);
	#endif 
	Random();
	Fast_Read_Out();
	int n, d;
	cin >> n >> d;
	for(int i = 1; i <= n; i++) cin >> a[i], (a[i] == 0 ? cnt++ : ans++);
	cout << cnt / d << endl;
	#ifdef JUDGE
//		cout << Time() << endl;
	#endif
}
// Easy Peasy Lemon Squeezy                                                            Sometimes it's the very people who no one imagines anything of who do the things no one can imagine.
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 508 KB Output is correct
3 Incorrect 2 ms 508 KB Output isn't correct
4 Incorrect 2 ms 508 KB Output isn't correct
5 Incorrect 2 ms 508 KB Output isn't correct
6 Incorrect 2 ms 508 KB Output isn't correct
7 Incorrect 2 ms 508 KB Output isn't correct
8 Incorrect 23 ms 1660 KB Output isn't correct
9 Incorrect 25 ms 1660 KB Output isn't correct
10 Incorrect 26 ms 1660 KB Output isn't correct