ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1025. Democracy in Danger

Compilation error
Posted by Evgeniy_Chernobrovkin(MUCTR-2013) 26 Sep 2013 03:01
#include "stdafx.h"
#include <iostream>
#include <conio.h>

using namespace std;

void bubbleSort(int array[], int col){
    int temp=0;
    for (int i=1;  i<col  ;  i++){
        for (int j=0;  j<col-i;  j++){
            if (array [j]>array [j+1]){
                temp=array[j];
                array [j]=array [j+1];
                array [j+1]=temp;
            }
        }
    }
}


int _tmain(int argc, _TCHAR* argv[])
{
    int k;
    int max;
    int sum;
    sum = 0;
    max = 0;
    cin >> k;
    int *p = new int[k-1];
    int i;
    for (i = 0; i < k; i++) {
        cin >> p[i];
    }

    bubbleSort(p, k-1);

    k=k/2+1;
    for (i=0; i<k; i++) {
    sum = sum + p[i]/2+1;
    }
    cout << sum;
    _getch();
        return 0;
}


kgxvh8-ov2fjo
kgxvh8-ov2fjo(1) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
What's wrong? There is no problem in Visual Studio 12 :(