답안 #52314

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
52314 2018-06-25T09:48:35 Z upsolving(#1344) 운세 보기 2 (JOI14_fortune_telling2) C++11
컴파일 오류
0 ms 0 KB
��#include <stdio.h>

#include <vector>

#include <queue>

#include <algorithm>

#include <iostream>

#include <string>

#include <bitset>

#include <map>

#include <set>

#include <tuple>

#include <string.h>

#include <math.h>

#include <random>

#include <functional>

#include <assert.h>

#include <math.h>

#include <sstream>

#include <iterator>

#include <numeric>



using namespace std;



using i64 = long long int;

using ii = pair<int, int>;

using ii64 = pair<i64, i64>;



class Mapping
{
public:
	void init(const vector<int>& raw, int base = 0)
	{
		start = base;
		arr = raw;
		sort(arr.begin(), arr.end());
		arr.erase(unique(arr.begin(), arr.end()), arr.end());

		for (int i = 0; i < arr.size(); i++)
			idx[arr[i]] = base + i;
	}

	int get_idx(int k)
	{
		return idx[k];
	}

	int get_value(int idx)
	{
		return arr[idx - start];
	}

private:
	int start;
	vector<int> arr;
	map<int, int> idx;
};



template<typename T>
class SegmentTree
{
public:
	void init(vector<T>& raw)
	{
		assert(!is_init);
		is_init = true;
		n = raw.size();
		int h = (int)ceil(log2(n));
		int tree_size = (1 << (h + 1));
		data.resize(tree_size);
		value = raw;

		init_internal(raw, 1, 0, n - 1);
	}

	T add(int idx, const T& added)
	{
		assert(is_init);
		return update(idx, value[idx] + added);
	}

	T update(int idx, const T& newVal)
	{
		assert(is_init);
		return update_internal(1, 0, n - 1, idx, newVal);
	}

	T query(int left, int right)
	{
		assert(is_init);
		return query_internal(1, 0, n - 1, left, right);
	}

	virtual T merge(const T& left, const T& right) = 0;
	virtual T merge_with_idx(const T& left, const T& right, int left_idx, int right_idx)
	{
		return merge(left, right);
	}

private:
	vector<T> data;
	vector<T> value;
	int n;
	bool is_init = false;

	T init_internal(vector<T>& raw, int node, int start, int end)
	{
		int mid = (start + end) / 2;
		if (start == end)
			return data[node] = raw[start];
		else
			return data[node] = merge_with_idx(init_internal(raw, node * 2, start, mid),
				init_internal(raw, node * 2 + 1, mid + 1, end), node * 2, node * 2 + 1);
	}

	T update_internal(int node, int start, int end, int index, const T& newVal)
	{
		if (index < start || index > end)
			return data[node];

		if (start == end)
		{
			data[node] = newVal;
			value[index] = newVal;
		}
		else
		{
			int mid = (start + end) / 2;
			data[node] = merge_with_idx(update_internal(node * 2, start, mid, index, newVal),
				update_internal(node * 2 + 1, mid + 1, end, index, newVal), node * 2, node * 2 + 1);
		}

		return data[node];
	}

	T query_internal(int node, int start, int end, int left, int right)
	{
		if (left <= start && end <= right)
			return data[node];

		int mid = (start + end) / 2;

		if (mid < left)
			return query_internal(node * 2 + 1, mid + 1, end, left, right);

		if (mid + 1 > right)
			return query_internal(node * 2, start, mid, left, right);

		return merge_with_idx(query_internal(node * 2, start, mid, left, right),
			query_internal(node * 2 + 1, mid + 1, end, left, right), node * 2, node * 2 + 1);
	}
};



class MaxTree : public SegmentTree<int>

{

public:

	virtual int merge(const int& l, const int& r) override

	{

		return max(l, r);

	}

};



class SumTree : public SegmentTree<int>

{

public:

	virtual int merge(const int& l, const int& r) override

	{

		return l + r;

	}

};



int card[200005][2];

int view[200005];



int main()

{

	int n, k;



	scanf("%d %d", &n, &k);



	vector<int> numbers;

	Mapping mapping;



	for (int i = 0; i < n; i++)

	{

		//scanf("%d %d", &card[i][0], &card[i][1]);



		if (card[i][0] > card[i][1])

			swap(card[i][0], card[i][1]);



		numbers.push_back(card[i][0]);

		numbers.push_back(card[i][1]);

	}



	vector<int> raw(numbers.size() + 5, 0);



	SumTree sumTree;

	MaxTree maxTree;



	sumTree.init(raw);

	maxTree.init(raw);



	vector<int> q;



	for (int i = 0; i < k; i++)

	{

		int t;

		//scanf("%d", &t);



		q.push_back(t);



		numbers.push_back(t);

	}



	mapping.init(numbers);



	for (int i = 0; i < k; i++)

	{

		maxTree.update(mapping.get_idx(q[i]), i);

		sumTree.add(mapping.get_idx(q[i]), 1);

	}



	vector<ii> ts;



	for (int i = 0; i < n; i++)

	{

		int l = mapping.get_idx(card[i][0]);

		int r = mapping.get_idx(card[i][1]) - 1;

		auto s = 0;

		

		if (l < r)

			s = maxTree.query(l, r);

		ts.emplace_back(s, i);

	}



	sort(ts.begin(), ts.end());



	int qx = 0;

	for (auto& ti : ts)

	{

		while (qx <= ti.first)

		{

			sumTree.add(mapping.get_idx(q[qx]), -1);

			qx++;

		}

			

		int swapNum = sumTree.query(mapping.get_idx(card[ti.second][1]), numbers.size() + 1);



		view[ti.second] = (swapNum + 1) % 2;

	}



	i64 ans = 0;



	for (int i = 0; i < n; i++)

		ans += card[i][view[i]];



	printf("%lld\n", ans);



	return 0;

}

Compilation message

fortune_telling2.cpp:1:1: error: stray '\377' in program
 # i n c l u d e   < s t d i o . h > 
 
 ^
fortune_telling2.cpp:1:2: error: stray '\376' in program
 # i n c l u d e   < s t d i o . h > 
 
  ^
fortune_telling2.cpp:1:3: error: stray '#' in program
 # i n c l u d e   < s t d i o . h > 
 
   ^
fortune_telling2.cpp:1:4: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
    ^
fortune_telling2.cpp:1:6: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
      ^
fortune_telling2.cpp:1:8: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
        ^
fortune_telling2.cpp:1:10: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
          ^
fortune_telling2.cpp:1:12: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
            ^
fortune_telling2.cpp:1:14: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
              ^
fortune_telling2.cpp:1:16: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                ^
fortune_telling2.cpp:1:18: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                  ^
fortune_telling2.cpp:1:22: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                      ^
fortune_telling2.cpp:1:24: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                        ^
fortune_telling2.cpp:1:26: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                          ^
fortune_telling2.cpp:1:28: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                            ^
fortune_telling2.cpp:1:30: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                              ^
fortune_telling2.cpp:1:32: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                                ^
fortune_telling2.cpp:1:34: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                                  ^
fortune_telling2.cpp:1:36: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                                    ^
fortune_telling2.cpp:1:38: warning: null character(s) ignored
 # i n c l u d e   < s t d i o . h > 
 
                                      ^
fortune_telling2.cpp:2:1: warning: null character(s) ignored
  # i n c l u d e   < v e c t o r > 
 
 ^
fortune_telling2.cpp:3:1: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
 ^
fortune_telling2.cpp:3:3: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
   ^
fortune_telling2.cpp:3:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < q u e u e > 
 
    ^
    if
fortune_telling2.cpp:3:5: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
     ^
fortune_telling2.cpp:3:7: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
       ^
fortune_telling2.cpp:3:9: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
         ^
fortune_telling2.cpp:3:11: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
           ^
fortune_telling2.cpp:3:13: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
             ^
fortune_telling2.cpp:3:15: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
               ^
fortune_telling2.cpp:3:17: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                 ^
fortune_telling2.cpp:3:21: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                     ^
fortune_telling2.cpp:3:23: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                       ^
fortune_telling2.cpp:3:25: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                         ^
fortune_telling2.cpp:3:27: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                           ^
fortune_telling2.cpp:3:29: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                             ^
fortune_telling2.cpp:3:31: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                               ^
fortune_telling2.cpp:3:33: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                                 ^
fortune_telling2.cpp:3:35: warning: null character(s) ignored
  # i n c l u d e   < q u e u e > 
 
                                   ^
fortune_telling2.cpp:4:1: warning: null character(s) ignored
  # i n c l u d e   < a l g o r i t h m > 
 
 ^
fortune_telling2.cpp:5:1: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
 ^
fortune_telling2.cpp:5:3: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
   ^
fortune_telling2.cpp:5:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < i o s t r e a m > 
 
    ^
    if
fortune_telling2.cpp:5:5: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
     ^
fortune_telling2.cpp:5:7: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
       ^
fortune_telling2.cpp:5:9: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
         ^
fortune_telling2.cpp:5:11: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
           ^
fortune_telling2.cpp:5:13: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
             ^
fortune_telling2.cpp:5:15: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
               ^
fortune_telling2.cpp:5:17: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                 ^
fortune_telling2.cpp:5:21: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                     ^
fortune_telling2.cpp:5:23: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                       ^
fortune_telling2.cpp:5:25: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                         ^
fortune_telling2.cpp:5:27: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                           ^
fortune_telling2.cpp:5:29: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                             ^
fortune_telling2.cpp:5:31: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                               ^
fortune_telling2.cpp:5:33: warning: null character(s) ignored
  # i n c l u d e   < i o s t r e a m > 
 
                                 ^
fortune_telling2.cpp:6:1: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g > 
 
 ^
fortune_telling2.cpp:7:1: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
 ^
fortune_telling2.cpp:7:3: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
   ^
fortune_telling2.cpp:7:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < b i t s e t > 
 
    ^
    if
fortune_telling2.cpp:7:5: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
     ^
fortune_telling2.cpp:7:7: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
       ^
fortune_telling2.cpp:7:9: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
         ^
fortune_telling2.cpp:7:11: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
           ^
fortune_telling2.cpp:7:13: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
             ^
fortune_telling2.cpp:7:15: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
               ^
fortune_telling2.cpp:7:17: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                 ^
fortune_telling2.cpp:7:21: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                     ^
fortune_telling2.cpp:7:23: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                       ^
fortune_telling2.cpp:7:25: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                         ^
fortune_telling2.cpp:7:27: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                           ^
fortune_telling2.cpp:7:29: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                             ^
fortune_telling2.cpp:7:31: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                               ^
fortune_telling2.cpp:7:33: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                                 ^
fortune_telling2.cpp:7:35: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                                   ^
fortune_telling2.cpp:7:37: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                                     ^
fortune_telling2.cpp:7:39: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                                       ^
fortune_telling2.cpp:7:41: warning: null character(s) ignored
  # i n c l u d e   < b i t s e t > 
 
                                         ^
fortune_telling2.cpp:8:1: warning: null character(s) ignored
  # i n c l u d e   < m a p > 
 
 ^
fortune_telling2.cpp:9:1: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
 ^
fortune_telling2.cpp:9:3: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
   ^
fortune_telling2.cpp:9:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < s e t > 
 
    ^
    if
fortune_telling2.cpp:9:5: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
     ^
fortune_telling2.cpp:9:7: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
       ^
fortune_telling2.cpp:9:9: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
         ^
fortune_telling2.cpp:9:11: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
           ^
fortune_telling2.cpp:9:13: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
             ^
fortune_telling2.cpp:9:15: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
               ^
fortune_telling2.cpp:9:17: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                 ^
fortune_telling2.cpp:9:21: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                     ^
fortune_telling2.cpp:9:23: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                       ^
fortune_telling2.cpp:9:25: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                         ^
fortune_telling2.cpp:9:27: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                           ^
fortune_telling2.cpp:9:29: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                             ^
fortune_telling2.cpp:9:31: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                               ^
fortune_telling2.cpp:9:33: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                                 ^
fortune_telling2.cpp:9:35: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                                   ^
fortune_telling2.cpp:9:37: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                                     ^
fortune_telling2.cpp:9:39: warning: null character(s) ignored
  # i n c l u d e   < s e t > 
 
                                       ^
fortune_telling2.cpp:10:1: warning: null character(s) ignored
  # i n c l u d e   < t u p l e > 
 
 ^
fortune_telling2.cpp:11:1: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
 ^
fortune_telling2.cpp:11:3: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
   ^
fortune_telling2.cpp:11:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < s t r i n g . h > 
 
    ^
    if
fortune_telling2.cpp:11:5: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
     ^
fortune_telling2.cpp:11:7: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
       ^
fortune_telling2.cpp:11:9: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
         ^
fortune_telling2.cpp:11:11: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
           ^
fortune_telling2.cpp:11:13: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
             ^
fortune_telling2.cpp:11:15: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
               ^
fortune_telling2.cpp:11:17: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                 ^
fortune_telling2.cpp:11:21: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                     ^
fortune_telling2.cpp:11:23: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                       ^
fortune_telling2.cpp:11:25: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                         ^
fortune_telling2.cpp:11:27: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                           ^
fortune_telling2.cpp:11:29: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                             ^
fortune_telling2.cpp:11:31: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                               ^
fortune_telling2.cpp:11:33: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                                 ^
fortune_telling2.cpp:11:35: warning: null character(s) ignored
  # i n c l u d e   < s t r i n g . h > 
 
                                   ^
fortune_telling2.cpp:12:1: warning: null character(s) ignored
  # i n c l u d e   < m a t h . h > 
 
 ^
fortune_telling2.cpp:13:1: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
 ^
fortune_telling2.cpp:13:3: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
   ^
fortune_telling2.cpp:13:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < r a n d o m > 
 
    ^
    if
fortune_telling2.cpp:13:5: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
     ^
fortune_telling2.cpp:13:7: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
       ^
fortune_telling2.cpp:13:9: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
         ^
fortune_telling2.cpp:13:11: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
           ^
fortune_telling2.cpp:13:13: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
             ^
fortune_telling2.cpp:13:15: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
               ^
fortune_telling2.cpp:13:17: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                 ^
fortune_telling2.cpp:13:21: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                     ^
fortune_telling2.cpp:13:23: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                       ^
fortune_telling2.cpp:13:25: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                         ^
fortune_telling2.cpp:13:27: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                           ^
fortune_telling2.cpp:13:29: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                             ^
fortune_telling2.cpp:13:31: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                               ^
fortune_telling2.cpp:13:33: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                                 ^
fortune_telling2.cpp:13:35: warning: null character(s) ignored
  # i n c l u d e   < r a n d o m > 
 
                                   ^
fortune_telling2.cpp:14:1: warning: null character(s) ignored
  # i n c l u d e   < f u n c t i o n a l > 
 
 ^
fortune_telling2.cpp:15:1: warning: null character(s) ignored
  # i n c l u d e   < a s s e r t . h > 
 
 ^
fortune_telling2.cpp:15:3: warning: null character(s) ignored
  # i n c l u d e   < a s s e r t . h > 
 
   ^
fortune_telling2.cpp:15:4: error: invalid preprocessing directive #i; did you mean #if?
  # i n c l u d e   < a s s e r t . h > 
 
    ^
    if
fortune_telling2.cpp:15:5: warning: null character(s) ignored
  # i n c l u d e   < a s s e r t . h > 
 
     ^
fortune_telling2.cpp:15:7: warning: null character(