Jump to content

Recommended Posts

ხო და მაგას რა ქვია, მაგ ფუნქციას, გუგლში რომ ვიპოვო და ვისწავლო?

Link to comment
Share on other sites

ხო და მაგას რა ქვია, მაგ ფუნქციას, გუგლში რომ ვიპოვო და ვისწავლო?

რა ფუნქცია ვერ გავიგე?

 

რო ჩაწერ /userName და სტრინგი userName-ის მნიშვენლობა რო დაგიბეჭდოს ხო?

 

არ არსებობს ეგეთი ფუნქცია, შენ უნდა დაწერო მაგის პროგრამა თუ გჭირდება

Link to comment
Share on other sites

გასაგებია, მაგას მე ვერ დავწერ :D

Link to comment
Share on other sites

მაინც ვერ გავიგე რისი დაწერა გსურს. კონსოლში შეიყვან რაღაცას და დაგიბეჭდოს შესაბამისი მნიშვნელობა? პაროლის დაწერის შემთხვევაში იგივე არ გააკეთე?

Link to comment
Share on other sites

სად დაიკარგეთ პროგრამისტი სასტავი?

 

 

x და y-ს გადავცემ ხელით და მასივში ვწერ მათ შორის მოთავსებულ კენტ რიცხვებს. ვიცით რომ x<y.

დავწერე კოდი და არ მუშაობს:

int size = (y - x) / 2 + 1;
            int[] numbers = new int;
            for (int i = 0; i != size; i++)
            {
                if (x % 2 != 0)
                    numbers = x;
                else continue; 
                x++;
                //if (x == y) break;
            }
 

პირველ რიცხვს აგდებს მასივში და დანარჩენ ადგილს 0ებით ავსებს.

მაგალIთად თუ გადავცემ 1 და 10-ს ბეჭდავს 1 0 0 0 0

// else continue; // რომ წავუშალო მაშინ გამოაქვს 1 0 3 0 5, ეგრე არ მაწყობს.

რა დედიმისისა უნდა ხომ არ იცით ვინმემ?

 

მართალია C#-ში ვწერ მაგრამ ეგ ეგენი იქაც იგივეა და მაგის ბრალი არ უნდა იყოს.

 

Link to comment
Share on other sites

მომილოცეთ ბრატცი

google jam -ის საკვალიფიკაციო რაუნდი გავიარე :D

ეგ რაარი?

ისე ზედა პოსტი ნახე აბა

გავაოფებ ცოტა

TSU-ში ჩაბარება პროგრამირებაზე  ღირს თუ არა ? 

მასწავლებლების და საგნების არჩევა დასწრებაზეა ყოველ სემესტრში. თუ მოასწრებ კი, თუ არადა პიზდეც.

Link to comment
Share on other sites

ეგ რაარი?

ისე ზედა პოსტი ნახე აბა

მასწავლებლების და საგნების არჩევა დასწრებაზეა ყოველ სემესტრში. თუ მოასწრებ კი, თუ არადა პიზდეც.

 

 შენ სად სწავლობ ? 

რომ მოვასწრო არ დავიჩაგრები  ? :D

Link to comment
Share on other sites

 შენ სად სწავლობ ? 

რომ მოვასწრო არ დავიჩაგრები  ? :D

მე მანდ ვსწავლობ :D მეორე სემესტრში ვერ მოვასწარი და დამენძრა :D 2 საგანს ეხლაც გავდივარ წინის წინა სემესტრისას :D

Link to comment
Share on other sites

ეგ რაარი?

ისე ზედა პოსტი ნახე აბა

მასწავლებლების და საგნების არჩევა დასწრებაზეა ყოველ სემესტრში. თუ მოასწრებ კი, თუ არადა პიზდეც.

#include <iostream>

using namespace std;

int main()
{
    int x, y, i, counter = 0;
    cin >> x >> y;
    int size = (x+y)/2 + 1;
    int numbers;
    for (i=x; i<=y; i++)
    {
        if (i % 2 == 0)
        {
            numbers[counter] = i;
            counter++;
        }
    }
    for (i=0; i<counter; i++)
    {
        cout << numbers << endl;
    }
    return 0;
}

და Google code jam არის google ის შეჯიბრი პროგრამირებაში :D

  • Upvote 1
Link to comment
Share on other sites

მე მანდ ვსწავლობ :D მეორე სემესტრში ვერ მოვასწარი და დამენძრა :D 2 საგანს ეხლაც გავდივარ წინის წინა სემესტრისას :D

 

 რატომ შეგეტენა ? 

Link to comment
Share on other sites

კოდი ნახე? ხო ეგ გინდოდა?

კი ეგ მინდოდა. გავასწორე. მაგრამ ის რატომ არ მუშაობდა ვერ გავიგე. ადრე ეგრე ვაკეთებდი ხოლმე. რამე გამომრჩა ალბათ

Link to comment
Share on other sites

x % 2 != 0 კი არა x % 2 == 0 უნდა გეწეროს

ეგრე ლუწებს ჩაყრის :D მე კენტი მინდოდა. შენ კოდშიც შევცვალე. სხვა რაღაცაში იყო საქმე.

და ეს რატო გიწერია?

int size = (x+y)/2 + 1;

მე y-x მაქვს.

მოკლედ ესე მიწერია ეხლა ეგ ფუნქცია და მუშაობს:

        static void fillArray(int x, int y)
        {
            int counter = 0;
            int size = (y - x) / 2 + 1;
            int[] numbers = new int;
            for (int i = x; i != y; i++)
            {
                if (i % 2 != 0)
                {
                    numbers[counter] = i;
                    counter++;
                }
            }
            printArray(numbers);
        }
Link to comment
Share on other sites

x+y კი არა y-x უნდა დამეწერა შემეშალა :D

ანუ (y-x)/2 + 1 უნდა იყოს რატო და 2 რიცვს შუა რამდენი რიციხვიცაა იმის ნახევარია ლუწი და პლიუს ერთი გააჩნია 2ზე რას ყოფ კენტს თუ ლუწს რო 1 არ დაგეკაროგს



ეს იყო გუშინ google ის შეჯიბრზე და ამოხენით აბა

 

 

Problem

Tic-Tac-Toe-Tomek is a game played on a 4 x 4 square board. The board starts empty, except that a single 'T' symbol may appear in one of the 16 squares. There are two players: X and O. They take turns to make moves, with X starting. In each move a player puts her symbol in one of the empty squares. Player X's symbol is 'X', and player O's symbol is 'O'.

After a player's move, if there is a row, column or a diagonal containing 4 of that player's symbols, or containing 3 of her symbols and the 'T' symbol, she wins and the game ends. Otherwise the game continues with the other player's move. If all of the fields are filled with symbols and nobody won, the game ends in a draw. See the sample input for examples of various winning positions.

Given a 4 x 4 board description containing 'X', 'O', 'T' and '.' characters (where '.' represents an empty square), describing the current state of a game, determine the status of the Tic-Tac-Toe-Tomek game going on. The statuses to choose from are:

  • "X won" (the game is over, and X won)
  • "O won" (the game is over, and O won)
  • "Draw" (the game is over, and it ended in a draw)
  • "Game has not completed" (the game is not over yet)

If there are empty cells, and the game is not over, you should output "Game has not completed", even if the outcome of the game is inevitable.

 

Input

The first line of the input gives the number of test cases, TT test cases follow. Each test case consists of 4 lines with 4 characters each, with each character being 'X', 'O', '.' or 'T' (quotes for clarity only). Each test case is followed by an empty line.

Output

For each test case, output one line containing "Case #x: y", where x is the case number (starting from 1) and y is one of the statuses given above. Make sure to get the statuses exactly right. When you run your code on the sample input, it should create the sample output exactly, including the "Case #1: ", the capital letter "O" rather than the number "0", and so on.

Limits

The game board provided will represent a valid state that was reached through play of the game Tic-Tac-Toe-Tomek as described above.

Small dataset

1 ≤ T ≤ 10.

Large dataset

1 ≤ T ≤ 1000.

Sample

Input 
 
Output 
  6
XXXT
....
OO..
....

XOXT
XXOO
OXOX
XXOO

XOX.
OX..
....
....

OOXX
OXXX
OX.T
O..O

XXXO
..O.
.O..
T...

OXXX
XO..
..O.
...O
  Case #1: X won
Case #2: Draw
Case #3: Game has not completed
Case #4: O won
Case #5: O won
Case #6: O won
Link to comment
Share on other sites

  • 3 weeks later...

დავიწყე სწავლა მითხარით ახლა სად უნდა შევიდე რო წერა დავიწყო

 

869b0a0d6168.jpg

Link to comment
Share on other sites

7f6789e0fc20.jpg

 

მაგას კი მივხვდი მაგრამ მერეეეეეეეე?

visual C++-ს მიაჭირე. მერე. მერე console application აირჩიე. მერე precompiled header იქნება მონიშნული ეგ გათიშე და new blank project აირჩიე. მერე სახელი დაარქვი და cout<<"Hello World!"<<endl; :)

Link to comment
Share on other sites

შეგიძლია უბრალო text file გახსნა და ბოლოს .cpp მიაწერო და იგივე იქნება დაახლოებით ოღონდ დებაგერის გარეშე

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.