ACM

abc_ramak

عضو جدید
کاربر ممتاز
متاسفانه C بلد نیستم و نتونستم چیز زیادی از کدی که نوشتین بفهمم، ولی سعی میکنم روی پاسکال بنویسم :)
اگه به نتیجه ای رسیدم خبرتون میکنم :smoke:
 

pnustudent110

عضو جدید
سلام دوستان ما هم انشا الله با هاتون همراه مي شيم البته از شما مي خوايم يه چيزايي ياد بگيريم
خلاصه دست ما رو هم بگيريد..
 

maimos

عضو جدید
سلام . لطفا در ابتدا اگر ممکنه برنامه Ancient Keyboard را در زبان c هم بنویسید.(نیاز شدید است)
اگر ممکن بود در تمامی برنامه ها این کار انجام شود.
 

server

عضو جدید
سلام . لطفا در ابتدا اگر ممکنه برنامه Ancient Keyboard را در زبان c هم بنویسید.(نیاز شدید است)
اگر ممکن بود در تمامی برنامه ها این کار انجام شود.
من دارم روی این برنامه کار می کنم به زودی وقتی تموم شد بروی اینترنت می زارم تا همه استفاده کنن
 

maimos

عضو جدید
اینم جواب سوالی که خودم درخواست کردم.
امیدوارم برای شما مفید باشه.

//*******mohammadi
#include <stdio.h>
#include <conio.h>
int main(void)
{
int a, b, i, j, t, n, mint, ns, timj[1002];
char le[3];
clrscr();
scanf("%d", &t);
while(t--)
{
scanf("%d", &n);
mint=0;
for(j=0; j<1002; j++)
timj[j]=0;
for(i=0; i<n; i++)
{
scanf("%s%d%d", &le, &a, &b);
if(b>mint)
mint=b;
for(j=a; j<b; j++)
timj[j]++;
}
for(i=0; i<mint; i++)
{
if(timj>0)
printf("%c", timj+'A'-1);
}
printf("\n");
}
getch();
return 0;
{
 

genius47

عضو جدید
سلام منم 1 سوال ای سی امی دارم میشه سریع جواب بدین تو تحلیلش ایراد دارم
Problem D: Blast the Enemy!​
A new computer game has just arrived and as an active and always-in-the-scene player, you should finish it before the
next university term starts. At each stage of this game, you have to shoot an enemy robot on its weakness point. The
weakness point of a robot is always the “center of mass” of its 2D shape in the screen. Fortunately, all robot shapes are
simple polygons with uniform density and you can write programs to calculate exactly the center of mass for each
polygon.
Let's have a more formal definition for center of mass (COM). The center of mass for a square, (also circle, and other
symmetric shapes) is its center point. And, if a simple shape​
C is partitioned into two simple shapes A and B with areas

S​
A
and SB, then COM(C) (as a vector) can be calculated by

A B
A B​
S S
COM C S COM A S COM B​

  ​
( )
( ) ( ) .
As a more formal definition, for a simple shape
A with area SA:

A
A​
S
a ds
COM A​
​
​
.
( )​
​
.​
Input​
(Standard Input)

The input contains a number of robot definitions. Each robot definition starts with a line containing​
n, the number of
vertices in robot’s polygon (
n <= 100). The polygon vertices are specified in the next n lines (in either clockwise or
counter-clock-wise order). Each of these lines contains two space-separated integers showing the coordinates of the
corresponding vertex. The absolute value of the coordinates does not exceed 100. The case of
n=0 shows the end of
input and should not be processed.

Output​
(Standard Output)

The​
ith line of the output should be of the form “Stage #i: x y” (omit the quotes), where (x,y) is the center of mass
for the
ith robot in the input. The coordinates must be rounded to exactly 6 digits after the decimal point.

Sample Input and Output​
Standard Input Standard Output
4
0 0
0 1
1 1
1 0
3
0 1
1 0
2 2
8
1 1
2 1
2 7
3 7
3 0
0 0
0 7
1 7
0
out puts
Stage #1: 0.500000 0.500000
Stage #2: 1.000000 1.000000
Stage #3: 1.500000 3.300000​
4
 

Similar threads

بالا